23 #ifndef __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_HPP
24 #define __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_HPP
32 namespace regression {
51 const arma::vec& responses,
66 const arma::vec& responses,
67 const arma::mat& initialPoint,
115 void Predict(
const arma::mat& predictors,
116 arma::vec& responses,
117 const double decisionBoundary = 0.5)
const;
134 const arma::vec& responses,
135 const double decisionBoundary = 0.5)
const;
146 const arma::vec& responses)
const;
162 #include "logistic_regression_impl.hpp"
164 #endif // __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_HPP
double & Lambda()
Modify the lambda value for L2-regularization.
arma::vec parameters
Vector of trained parameters.
LogisticRegression(const arma::mat &predictors, const arma::vec &responses, const double lambda=0)
Construct the LogisticRegression class with the given labeled training data.
void Predict(const arma::mat &predictors, arma::vec &responses, const double decisionBoundary=0.5) const
Predict the responses to a given set of predictors.
const arma::vec & Parameters() const
Return the parameters (the b vector).
double ComputeAccuracy(const arma::mat &predictors, const arma::vec &responses, const double decisionBoundary=0.5) const
Compute the accuracy of the model on the given predictors and responses, optionally using the given d...
const double & Lambda() const
Return the lambda value for L2-regularization.
std::string ToString() const
double lambda
L2-regularization penalty parameter.
double ComputeError(const arma::mat &predictors, const arma::vec &responses) const
Compute the error of the model.
The generic L-BFGS optimizer, which uses a back-tracking line search algorithm to minimize a function...
arma::vec & Parameters()
Modify the parameters (the b vector).