LIBIRWLS
LIBIRWLS-predict.h File Reference

Functions to classify data with a trained model. More...

#include "IOStructures.h"

Go to the source code of this file.

Functions

double * test (svm_dataset dataset, model mymodel, predictProperties props)
 Function to classify data in a labeled dataset and to obtain the accuracy. More...
 
double * softTest (svm_dataset dataset, model mymodel, predictProperties props)
 Function to obtain the soft output of the classifier. More...
 
void printPredictInstructions (void)
 Print instructions. More...
 
predictProperties parsePredictParameters (int *argc, char ***argv)
 It parses the prediction parameters from the command line. More...
 

Detailed Description

Functions to classify data with a trained model.

Author
Roberto Diaz Morales
Date
23 Aug 2016 Functions to classify data with a trained model.

Function Documentation

§ parsePredictParameters()

predictProperties parsePredictParameters ( int *  argc,
char ***  argv 
)

It parses the prediction parameters from the command line.

It reads the command line, extract the parameters and creates a strict with the value of its values.

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 test parameters.

§ printPredictInstructions()

void printPredictInstructions ( void  )

Print instructions.

It shows the command line instructions in the standard output.

§ softTest()

double* softTest ( svm_dataset  dataset,
model  mymodel,
predictProperties  props 
)

Function to obtain the soft output of the classifier.

Function to obtain the soft output (the output of the classifier before using the threshold to decide class +1 or -1) of the model on a dataset. It is useful to combine this output with other algorithms in ensembles.

Parameters
datasetThe test set.
mymodelA trained SVM model.
propsThe test properties.
Returns
The output of the classifier for every test sample (soft output).

§ test()

double* test ( svm_dataset  dataset,
model  mymodel,
predictProperties  props 
)

Function to classify data in a labeled dataset and to obtain the accuracy.

Function that uses a trained model on a dataset and obtains the class of every training sample.

Parameters
datasetThe test set.
mymodelA trained SVM model.
propsThe test properties.
Returns
The output of the classifier for every test sample (soft output).