16 #ifndef __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP 17 #define __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP 22 namespace regression {
29 template<
typename MatType = arma::mat>
38 const arma::Row<size_t>& responses,
68 double Evaluate(
const arma::mat& parameters)
const;
84 double Evaluate(
const arma::mat& parameters,
const size_t i)
const;
93 void Gradient(
const arma::mat& parameters, arma::mat& gradient)
const;
105 void Gradient(
const arma::mat& parameters,
107 arma::mat& gradient)
const;
130 #include "logistic_regression_function_impl.hpp" 132 #endif // __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP The log-likelihood function for the logistic regression objective function.
void Gradient(const arma::mat ¶meters, arma::mat &gradient) const
Evaluate the gradient of the logistic regression log-likelihood function with the given parameters...
Linear algebra utility functions, generally performed on matrices or vectors.
size_t NumFunctions() const
Return the number of separable functions (the number of predictor points).
arma::mat initialPoint
The initial point, from which to start the optimization.
const arma::mat & InitialPoint() const
Return the initial point for the optimization.
double Evaluate(const arma::mat ¶meters) const
Evaluate the logistic regression log-likelihood function with the given parameters.
const MatType & predictors
The matrix of data points (predictors).
double & Lambda()
Modify the regularization parameter (lambda).
const arma::Row< size_t > & responses
The vector of responses to the input data points.
arma::mat & InitialPoint()
Modify the initial point for the optimization.
const double & Lambda() const
Return the regularization parameter (lambda).
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
const arma::vec & Responses() const
Return the vector of responses.
const arma::mat & GetInitialPoint() const
Return the initial point for the optimization.
const MatType & Predictors() const
Return the matrix of predictors.
double lambda
The regularization parameter for L2-regularization.
LogisticRegressionFunction(const MatType &predictors, const arma::Row< size_t > &responses, const double lambda=0)