notice

This is unreleased documentation for Rasa Open Source Documentation Main/Unreleased version.
For the latest released documentation, see the latest version (3.x).

Version: Main/Unreleased

rasa.nlu.classifiers.logistic_regression_classifier

LogisticRegressionClassifier Objects

@DefaultV1Recipe.register(
DefaultV1Recipe.ComponentType.INTENT_CLASSIFIER, is_trainable=True
)
class LogisticRegressionClassifier(IntentClassifier, GraphComponent)

Intent classifier using the Logistic Regression.

required_components

| @classmethod
| required_components(cls) -> List[Type]

Components that should be included in the pipeline before this component.

required_packages

| @staticmethod
| required_packages() -> List[Text]

Any extra python dependencies required for this component to run.

get_default_config

| @staticmethod
| get_default_config() -> Dict[Text, Any]

The component's default config (see parent class for full docstring).

__init__

| __init__(config: Dict[Text, Any], name: Text, model_storage: ModelStorage, resource: Resource) -> None

Construct a new classifier.

train

| train(training_data: TrainingData) -> Resource

Train the intent classifier on a data set.

create

| @classmethod
| create(cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext) -> GraphComponent

Creates a new untrained component (see parent class for full docstring).

process

| process(messages: List[Message]) -> List[Message]

Return the most likely intent and its probability for a message.

persist

| persist() -> None

Persist this model into the passed directory.

load

| @classmethod
| load(cls, config: Dict[Text, Any], model_storage: ModelStorage, resource: Resource, execution_context: ExecutionContext, **kwargs: Any, ,) -> GraphComponent

Loads trained component (see parent class for full docstring).

process_training_data

| process_training_data(training_data: TrainingData) -> TrainingData

Process the training data.

validate_config

| @classmethod
| validate_config(cls, config: Dict[Text, Any]) -> None

Validates that the component is configured properly.