|
| | SparseSVMFunction () |
| | Nothing to do for the default constructor. More...
|
| |
| | SparseSVMFunction (const arma::sp_mat &dataset, const arma::vec &labels) |
| | Member initialization constructor. More...
|
| |
| const arma::sp_mat & | Dataset () const |
| | Get the dataset. More...
|
| |
| arma::sp_mat & | Dataset () |
| | Modify the dataset. More...
|
| |
| double | Evaluate (const arma::mat ¶meters, const size_t startId, const size_t batchSize=1) |
| | Evaluate the hinge loss function on the specified datapoints. More...
|
| |
| template<typename GradType > |
| void | Gradient (const arma::mat ¶meters, size_t id, GradType &gradient) |
| | Evaluate the gradient the gradient of the hinge loss function, following the SparseFunctionType requirements on the Gradient function. More...
|
| |
| const arma::mat & | InitialPoint () const |
| | Return the initial point for the optimization. More...
|
| |
| arma::mat & | InitialPoint () |
| | Modify the initial point for the optimization. More...
|
| |
| const arma::vec & | Labels () const |
| | Get the labels. More...
|
| |
| arma::vec & | Labels () |
| | Modify the labels. More...
|
| |
| size_t | NumFunctions () |
| | Return the number of functions. More...
|
| |
| void | Shuffle () |
| | Shuffle the dataset. More...
|
| |
Definition at line 18 of file sparse_svm_function.hpp.
Member initialization constructor.
| const arma::sp_mat& Dataset |
( |
| ) |
const |
|
inline |
| arma::sp_mat& Dataset |
( |
| ) |
|
|
inline |
| double Evaluate |
( |
const arma::mat & |
parameters, |
|
|
const size_t |
startId, |
|
|
const size_t |
batchSize = 1 |
|
) |
| |
Evaluate the hinge loss function on the specified datapoints.
- Parameters
-
| parameters | The parameters of the SVM. |
| startId | First index of the datapoints to use for function evaluation. |
| batchSize | Size of batch to process. |
- Returns
- The value of the loss function at the given parameters.
| void Gradient |
( |
const arma::mat & |
parameters, |
|
|
size_t |
id, |
|
|
GradType & |
gradient |
|
) |
| |
Evaluate the gradient the gradient of the hinge loss function, following the SparseFunctionType requirements on the Gradient function.
- Parameters
-
| parameters | The parameters of the SVM. |
| id | Index of the datapoint to use for the gradient evaluation. |
| gradient | Sparse matrix to output the gradient into. |
| const arma::mat& InitialPoint |
( |
| ) |
const |
|
inline |
| arma::mat& InitialPoint |
( |
| ) |
|
|
inline |
| const arma::vec& Labels |
( |
| ) |
const |
|
inline |
Return the number of functions.
The documentation for this class was generated from the following file: