MLPACK
1.0.10
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
mlpack
methods
logistic_regression
logistic_regression_function.hpp
Go to the documentation of this file.
1
24
#ifndef __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP
25
#define __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP
26
27
#include <
mlpack/core.hpp
>
28
29
namespace
mlpack {
30
namespace
regression {
31
37
class
LogisticRegressionFunction
38
{
39
public
:
40
LogisticRegressionFunction
(
const
arma::mat&
predictors
,
41
const
arma::vec&
responses
,
42
const
double
lambda
= 0);
43
44
LogisticRegressionFunction
(
const
arma::mat& predictors,
45
const
arma::vec& responses,
46
const
arma::mat&
initialPoint
,
47
const
double
lambda
= 0);
48
50
const
arma::mat&
InitialPoint
()
const
{
return
initialPoint
; }
52
arma::mat&
InitialPoint
() {
return
initialPoint
; }
53
55
const
double
&
Lambda
()
const
{
return
lambda
; }
57
double
&
Lambda
() {
return
lambda
; }
58
60
const
arma::mat&
Predictors
()
const
{
return
predictors
; }
62
const
arma::vec&
Responses
()
const
{
return
responses
; }
63
75
double
Evaluate
(
const
arma::mat& parameters)
const
;
76
91
double
Evaluate
(
const
arma::mat& parameters,
const
size_t
i)
const
;
92
100
void
Gradient
(
const
arma::mat& parameters, arma::mat& gradient)
const
;
101
112
void
Gradient
(
const
arma::mat& parameters,
113
const
size_t
i,
114
arma::mat& gradient)
const
;
115
117
const
arma::mat&
GetInitialPoint
()
const
{
return
initialPoint
; }
118
120
size_t
NumFunctions
()
const
{
return
predictors.n_cols; }
121
122
private
:
124
arma::mat
initialPoint
;
126
const
arma::mat&
predictors
;
128
const
arma::vec&
responses
;
130
double
lambda
;
131
};
132
133
};
// namespace regression
134
};
// namespace mlpack
135
136
#endif // __MLPACK_METHODS_LOGISTIC_REGRESSION_LOGISTIC_REGRESSION_FUNCTION_HPP
Generated by
1.8.3.1