LIBIRWLS
budgeted-train.h File Reference

Functions to train a budgeted SVM using the IRWLS algorithm. More...

#include "IOStructures.h"

Go to the source code of this file.

Functions

int * randomCentroids (svm_dataset dataset, properties props)
 Random selection of centroids for the budgeted model. More...
 
int * SGMA (svm_dataset dataset, properties props)
 Sparse Greedy Matrix Approximation algorithm. More...
 
double * IRWLSpar (svm_dataset dataset, int *indexes, properties props)
 Iterative Re-Weighted Least Squares Algorithm. More...
 
void printBudgetedInstructions (void)
 Print Instructions. More...
 
properties parseTrainParameters (int *argc, char ***argv)
 It parses input command line to extract the parameters of the budgeted algorithm. More...
 
model calculateBudgetedModel (properties props, svm_dataset dataset, int *centroids, double *beta)
 It converts the result of the budgeted algorithm into a model struct. More...
 

Detailed Description

Functions to train a budgeted SVM using the IRWLS algorithm.

Author
Roberto Diaz Morales
Date
23 Aug 2016 Functions to train a budgeted SVM using the IRWLS algorithm.

Function Documentation

§ calculateBudgetedModel()

model calculateBudgetedModel ( properties  props,
svm_dataset  dataset,
int *  centroids,
double *  beta 
)

It converts the result of the budgeted algorithm into a model struct.

It converts the result into a model struct.

Parameters
propsThe training parameters.
datasetThe training set.
centroidsof the selected centroids by the SGMA algorithm.
betaThe weights of every centroid obtained with the IRWLS algorithm.
Returns
The struct that storages all the information of the classifier.

§ IRWLSpar()

double* IRWLSpar ( svm_dataset  dataset,
int *  indexes,
properties  props 
)

Iterative Re-Weighted Least Squares Algorithm.

IRWLS procedure to obtain the weights of the budgeted model.

Parameters
datasetThe training set.
indexesThe indexes of the centroids selected by the SGMA algorithm.
propsThe struct with the training parameters.
Returns
The weights of every centroid.

§ parseTrainParameters()

properties parseTrainParameters ( int *  argc,
char ***  argv 
)

It parses input command line to extract the parameters of the budgeted algorithm.

It parses input command line to extract the parameters.

Parameters
argcThe number of words of the command line.
argvThe list of words of the command line.
Returns
A struct that contains the values of the training parameters of the budgeted algorithm.

§ printBudgetedInstructions()

void printBudgetedInstructions ( void  )

Print Instructions.

It shows budgeted-train command line instructions in the standard output.

§ randomCentroids()

int* randomCentroids ( svm_dataset  dataset,
properties  props 
)

Random selection of centroids for the budgeted model.

It creates a random permutation and selects the first elements to be the indexes of the centroids of the budgeted model.

Parameters
datasetThe training set.
propsThe struct with the training parameters.

§ SGMA()

int* SGMA ( svm_dataset  dataset,
properties  props 
)

Sparse Greedy Matrix Approximation algorithm.

Sparse Greedy Matrix Approximation algorithm to select the basis elements of the budgeted model.

Parameters
datasetThe training set.
propsThe struct with the training parameters.