This is unreleased documentation for Rasa & Rasa Pro 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# Copy @DefaultV1Recipe . register (
DefaultV1Recipe . ComponentType . INTENT_CLASSIFIER , is_trainable = True
)
class LogisticRegressionClassifier ( IntentClassifier , GraphComponent )
Intent classifier using the Logistic Regression.
required_components# Copy @classmethod
def required_components ( cls ) - > List [ Type ]
Components that should be included in the pipeline before this component.
required_packages# Copy @staticmethod
def required_packages ( ) - > List [ Text ]
Any extra python dependencies required for this component to run.
get_default_config# Copy @staticmethod
def get_default_config ( ) - > Dict [ Text , Any ]
The component's default config (see parent class for full docstring).
__init__# Copy def __init__ ( config : Dict [ Text , Any ] , name : Text , model_storage : ModelStorage ,
resource : Resource ) - > None
Construct a new classifier.
train# Copy def train ( training_data : TrainingData ) - > Resource
Train the intent classifier on a data set.
create# Copy @classmethod
def create (
cls , config : Dict [ Text , Any ] , model_storage : ModelStorage ,
resource : Resource ,
execution_context : ExecutionContext ) - > "LogisticRegressionClassifier"
Creates a new untrained component (see parent class for full docstring).
process# Copy def process ( messages : List [ Message ] ) - > List [ Message ]
Return the most likely intent and its probability for a message.
persist# Persist this model into the passed directory.
load# Copy @classmethod
def load ( cls , config : Dict [ Text , Any ] , model_storage : ModelStorage ,
resource : Resource , execution_context : ExecutionContext ,
** kwargs : Any ) - > "LogisticRegressionClassifier"
Loads trained component (see parent class for full docstring).
process_training_data# Copy def process_training_data ( training_data : TrainingData ) - > TrainingData
Process the training data.
validate_config# Copy @classmethod
def validate_config ( cls , config : Dict [ Text , Any ] ) - > None
Validates that the component is configured properly.