Inheritance diagram for classias::train::lbfgs_logistic_binary< data_tmpl, model_tmpl >:

| data_tmpl | The type of the data set for training. | |
| model_tmpl | The type of the feature weights. |
Public Types | |
| typedef data_tmpl | data_type |
| A type representing a data set for training. | |
| typedef model_tmpl | model_type |
| The type implementing a model (weight vector for features). | |
| typedef lbfgs_base< model_tmpl > | base_class |
| A synonym of the base class. | |
|
typedef lbfgs_logistic_binary< data_tmpl, model_tmpl > | this_class |
| A synonym of this class. | |
| typedef model_type::value_type | value_type |
| The type representing a value. | |
| typedef data_type::instance_type | instance_type |
| A type representing an instance in the training data. | |
| typedef data_type::const_iterator | const_iterator |
| A type providing a read-only random-access iterator for instances. | |
| typedef instance_type::features_type | features_type |
| A type representing a vector of features. | |
| typedef features_type::identifier_type | feature_identifier_type |
| A type representing a feature identifier. | |
|
typedef classify::linear_binary_logistic< model_type > | error_type |
| A classifier type. | |
Public Member Functions | |
| lbfgs_logistic_binary () | |
| Constructs the object. | |
| virtual | ~lbfgs_logistic_binary () |
| Destructs the object. | |
| void | clear () |
| Resets the internal states and parameters to default. | |
| void | train (const data_type &data, std::ostream &os, int holdout=-1, bool acconly=true) |
| Trains a model on a data set. | |
Protected Member Functions | |
| virtual value_type | loss_and_gradient (const value_type *x, value_type *g, const int n) |
| Computes the loss and gradients of the data set. | |
| void | holdout_evaluation () |
| Performs a holdout evaluation. | |
Protected Attributes | |
| const data_type * | m_data |
| A data set for training. | |
| virtual value_type classias::train::lbfgs_logistic_binary< data_tmpl, model_tmpl >::loss_and_gradient | ( | const value_type * | x, | |
| value_type * | g, | |||
| const int | n | |||
| ) | [inline, protected, virtual] |
Computes the loss and gradients of the data set.
| x | The current feature weights. | |
| g | The gradient vector to which this function stores. | |
| n | The number of features. |
Implements classias::train::lbfgs_base< model_tmpl >.
| void classias::train::lbfgs_logistic_binary< data_tmpl, model_tmpl >::train | ( | const data_type & | data, | |
| std::ostream & | os, | |||
| int | holdout = -1, |
|||
| bool | acconly = true | |||
| ) | [inline] |
Trains a model on a data set.
| data | The data set for training (and holdout evaluation). | |
| os | The output stream for progress reports. | |
| holdout | The group number for holdout evaluation. Specify a negative value if a holdout evaluation is unnecessary. | |
| acconly | Unused (reserved only for the compatibility with multi-class classification). |