rasa.nlu.classifiers._sklearn_intent_classifier
SklearnIntentClassifier Objects
Intent classifier using the sklearn framework
__init__
Construct a new intent classifier using the sklearn framework.
transform_labels_str2num
Transforms a list of strings into numeric label representation.
Arguments:
labels
: List of labels to convert to numeric representation
transform_labels_num2str
Transforms a list of strings into numeric label representation.
Arguments:
y
: List of labels to convert to numeric representation
train
Train the intent classifier on a data set.
process
Return the most likely intent and its probability for a message.
predict_prob
Given a bow vector of an input text, predict the intent label.
Return probabilities for all labels.
Arguments:
X
: bow of input text
Returns:
vector of probabilities containing one entry for each label
predict
Given a bow vector of an input text, predict most probable label.
Return only the most likely label.
Arguments:
X
: bow of input text
Returns:
tuple of first, the most probable label and second,
persist
Persist this model into the passed directory.
load
Loads trained component (see parent class for full docstring).