LIBIRWLS
PSIRWLS-train.h File Reference

Functions to train a semi parametric 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 semiparametric 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 printPSIRWLSInstructions (void)
 Print Instructions. More...
 
properties parseTrainParameters (int *argc, char ***argv)
 It parses input command line to extract the parameters of the PSIRWLS algorithm. More...
 
model calculatePSIRWLSModel (properties props, svm_dataset dataset, int *centroids, double *beta)
 It converts the result of the PSIRWLS algorithm into a model struct. More...
 

Detailed Description

Functions to train a semi parametric SVM using the IRWLS algorithm.

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

Function Documentation

§ calculatePSIRWLSModel()

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

It converts the result of the PSIRWLS 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 semi parametric 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 PSIRWLS 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 PSIRWLS algorithm.

§ printPSIRWLSInstructions()

void printPSIRWLSInstructions ( void  )

Print Instructions.

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

§ randomCentroids()

int* randomCentroids ( svm_dataset  dataset,
properties  props 
)

Random selection of centroids for the semiparametric model.

It creates a random permutation and selects the first elements to be the indexes of the centroids of the semiparametric 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 semi parametric model.

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