LIBIRWLS
|
Implementation of the functions of the python extension. More...
#include "Python.h"
#include "numpy/arrayobject.h"
#include "IOStructures.h"
#include "full-train.h"
#include "budgeted-train.h"
#include "ParallelAlgorithms.h"
#include "LIBIRWLS-predict.h"
#include <omp.h>
#include "pythonmodule.h"
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... | |
Implementation of the functions of the python extension.
See pythonextension.h for a detailed description of the functions and parameters.
void delModel | ( | PyObject * | pymodel | ) |
Model capsule destructor.
The capsule destructor of the model object
pymodel | The model to delete |
PyMODINIT_FUNC initLIBIRWLS | ( | void | ) |
Initialization of the python module.
This function is called when the python extension is initialzed.
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.
arr1 | Python numpy array with the training set features. |
args | Python numpy array with the training set labels. |
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.
arr1 | Python numpy array with the training set features. |
args | Python numpy array with the training set labels. |