LIBIRWLS
pythonmodule.h File Reference

Functions of the python extension that makes use of this library. More...

Go to the source code of this file.

Functions

void delModel (PyObject *pymodel)
 Model capsule destructor. More...
 
svm_dataset numpy2dataset (PyObject *arr1, PyObject *arr2)
 Convert numpy array to a dataset. More...
 
svm_dataset numpy2datasetWithAverage (PyObject *arr1, PyObject *arr2)
 Convert numpy array to a dataset and the average of every class data. More...
 
PyMODINIT_FUNC initLIBIRWLS (void)
 Initialization of the python module. More...
 

Detailed Description

Functions of the python extension that makes use of this library.

A definition of the functions of this python extension

Author
Roberto Diaz Morales
Date
23 Sep 2016

Function Documentation

§ delModel()

void delModel ( PyObject *  pymodel)

Model capsule destructor.

The capsule destructor of the model object

Parameters
pymodelThe model to delete

§ initLIBIRWLS()

PyMODINIT_FUNC initLIBIRWLS ( void  )

Initialization of the python module.

This function is called when the python extension is initialzed.

Returns
The init function.

§ numpy2dataset()

svm_dataset numpy2dataset ( PyObject *  arr1,
PyObject *  arr2 
)

Convert numpy array to a dataset.

It converts a dataset in numpy array format to our internal format.

Parameters
arr1Python numpy array with the training set features.
argsPython numpy array with the training set labels.
Returns
The dataset in our format.

§ numpy2datasetWithAverage()

svm_dataset numpy2datasetWithAverage ( PyObject *  arr1,
PyObject *  arr2 
)

Convert numpy array to a dataset and the average of every class data.

It converts a dataset in numpy array format to our internal format and calculates the average of every class data.

Parameters
arr1Python numpy array with the training set features.
argsPython numpy array with the training set labels.
Returns
The dataset in our format.