Ridge regression / logistic regression built-in model. More...
#include <ml_linear_model.h>
Public Member Functions | |
| MlLinearModel (MlTaskType type=MlTaskType::Regression, double regularization=1.0) | |
| MlTensor | predict (const MlTensor &input) const override |
| bool | save (const QString &path) const override |
| bool | load (const QString &path) override |
| QString | modelType () const override |
| MlTaskType | taskType () const override |
| const Eigen::MatrixXf & | weights () const |
| const Eigen::VectorXf & | bias () const |
| Public Member Functions inherited from MLLIB::MlModel | |
| virtual | ~MlModel ()=default |
Additional Inherited Members | |
| Public Types inherited from MLLIB::MlModel | |
| typedef QSharedPointer< MlModel > | SPtr |
Ridge regression / logistic regression built-in model.
Definition at line 61 of file ml_linear_model.h.

| MlLinearModel::MlLinearModel | ( | MlTaskType | type = MlTaskType::Regression, |
| double | regularization = 1.0 ) |
Construct a linear model.
| [in] | type | Task type (Regression or Classification). |
| [in] | regularization | Ridge / L2 regularization strength (lambda). |
Definition at line 75 of file ml_linear_model.cpp.
| const VectorXf & MlLinearModel::bias | ( | ) | const |
Definition at line 222 of file ml_linear_model.cpp.
|
overridevirtual |
Load a model from disk.
| [in] | path | File path. |
Implements MLLIB::MlModel.
Definition at line 151 of file ml_linear_model.cpp.
|
overridevirtual |
Implements MLLIB::MlModel.
Definition at line 201 of file ml_linear_model.cpp.
Run inference on the given input tensor.
| [in] | input | The input data. |
Implements MLLIB::MlModel.
Definition at line 83 of file ml_linear_model.cpp.
|
overridevirtual |
Serialise the model to disk.
| [in] | path | File path. |
Implements MLLIB::MlModel.
Definition at line 102 of file ml_linear_model.cpp.
|
overridevirtual |
Implements MLLIB::MlModel.
Definition at line 208 of file ml_linear_model.cpp.
| const MatrixXf & MlLinearModel::weights | ( | ) | const |
Definition at line 215 of file ml_linear_model.cpp.