Result of binomial logistic regression.
More...
#include <LogisticRegression.hpp>
|
void | predict (Eigen::Ref< const Eigen::MatrixXd > X, Eigen::Ref< Eigen::VectorXd > y) const |
| Predicts labels for features X given w. More...
|
|
Eigen::VectorXd | predict (Eigen::Ref< const Eigen::MatrixXd > X) const |
| Predicts labels for features X given w. Version which returns a new vector. More...
|
|
double | predict_single (Eigen::Ref< const Eigen::VectorXd > x) const |
| Predicts label for feature x given w. More...
|
|
std::string | to_string () const |
| Formats the result as string.
|
|
Result of binomial logistic regression.
◆ predict() [1/2]
void ml::LogisticRegression::Result::predict |
( |
Eigen::Ref< const Eigen::MatrixXd > |
X, |
|
|
Eigen::Ref< Eigen::VectorXd > |
y |
|
) |
| const |
Predicts labels for features X given w.
- Parameters
-
| X | D x N matrix of X values, with data points in columns. |
[out] | y | Y vector with length N. |
- Returns
- Fills
y
with -1 or 1 values.
- Exceptions
-
std::invalid_argument | If matrix or vector dimensions do not match. |
◆ predict() [2/2]
Eigen::VectorXd ml::LogisticRegression::Result::predict |
( |
Eigen::Ref< const Eigen::MatrixXd > |
X | ) |
const |
|
inline |
Predicts labels for features X given w. Version which returns a new vector.
- Parameters
-
X | D x N matrix of X values, with data points in columns. |
- Returns
- Vector with -1 or 1 values.
- Exceptions
-
std::invalid_argument | If matrix or vector dimensions do not match. |
◆ predict_single()
double ml::LogisticRegression::Result::predict_single |
( |
Eigen::Ref< const Eigen::VectorXd > |
x | ) |
const |
Predicts label for feature x given w.
- Parameters
-
- Returns
- -1 or 1.
- Exceptions
-
std::invalid_argument | If vector dimensions do not match. |
Eigen::VectorXd ml::LogisticRegression::Result::w |
Fitted coefficients of the LR model.
◆ steps_taken
unsigned int ml::LogisticRegression::Result::steps_taken |
Number of steps taken to converge.
◆ converged
bool ml::LogisticRegression::Result::converged |
The documentation for this struct was generated from the following file: