pub struct LogisticRegression { }
Expand description
Implements Logistic Regression classifier.
[ml_intro_lr]
Creates empty model.
Creates Logistic Regression model with parameters given.
Loads and creates a serialized LogisticRegression from a file
Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
Load the LogisticRegression from this file again, by calling this function with the path to the file.
Optionally specify the node for the file containing the classifier
- filepath: path to serialized LogisticRegression
- nodeName: name of node containing the classifier
Loads and creates a serialized LogisticRegression from a file
Use LogisticRegression::save to serialize and store an LogisticRegression to disk.
Load the LogisticRegression from this file again, by calling this function with the path to the file.
Optionally specify the node for the file containing the classifier
- filepath: path to serialized LogisticRegression
- nodeName: name of node containing the classifier
This alternative version of LogisticRegression::load function uses the following default values for its arguments:
Clears the algorithm state
Reads algorithm parameters from a file storage
Stores algorithm parameters in a file storage
Stores algorithm parameters in a file storage
Read more
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Saves the algorithm to a file.
In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
Returns the algorithm string identifier.
This string is used as top level xml/yml node tag when the object is saved to a file or string.
Return an the underlying raw pointer while consuming this wrapper.
Read more
Return the underlying mutable raw pointer
Read more
Formats the value using the given formatter.
Read more
Executes the destructor for this type.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
Kind of regularization to be applied. See LogisticRegression::RegKinds.
Read more
Kind of training method used. See LogisticRegression::Methods.
Read more
Specifies the number of training samples taken in each step of Mini-Batch Gradient
Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It
has to take values less than the total number of training samples.
Read more
Termination criteria of the algorithm.
Read more
Kind of regularization to be applied. See LogisticRegression::RegKinds.
Read more
Kind of training method used. See LogisticRegression::Methods.
Read more
Specifies the number of training samples taken in each step of Mini-Batch Gradient
Descent. Will only be used if using LogisticRegression::MINI_BATCH training algorithm. It
has to take values less than the total number of training samples.
Read more
Termination criteria of the algorithm.
Read more
Predicts responses for input samples and returns a float type.
Read more
Predicts responses for input samples and returns a float type.
Read more
This function returns the trained parameters arranged across rows.
Read more
Returns the number of variables in training samples
Returns true if the model is trained
Returns true if the model is classifier
Computes error on the training or test dataset
Read more
Predicts response(s) for the provided sample(s)
Read more
Predicts response(s) for the provided sample(s)
Read more
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.