OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
OpenANN::LibSVM Namespace Reference

Functions

int load (Eigen::MatrixXd &in, Eigen::MatrixXd &out, const char *filename, int min_inputs=0)
 Read a libsvm-encoded dataset from the filesystem and load its values into given in- and output matrices. More...
 
int load (Eigen::MatrixXd &in, Eigen::MatrixXd &out, std::istream &stream, int min_inputs=0)
 Read a libsvm-encoded dataset from any input stream and load its values into given in- and output matrices. More...
 
void save (const Eigen::MatrixXd &in, const Eigen::MatrixXd &out, const char *filename)
 Export a given dataset represented by in- and output matrices into a libsvm file. More...
 
void save (const Eigen::MatrixXd &in, const Eigen::MatrixXd &out, std::ostream &stream)
 Write a given dataset from in- and output matrices to an output stream in libsvm format. More...
 

Function Documentation

int OpenANN::LibSVM::load ( Eigen::MatrixXd &  in,
Eigen::MatrixXd &  out,
const char *  filename,
int  min_inputs = 0 
)

Read a libsvm-encoded dataset from the filesystem and load its values into given in- and output matrices.

Parameters
ininput matrix with an unspecific dimension that will contain the data
outoutput matrix with an unspecific dimension that will contain the data.
filenamename to the corresponding libsvm dataset file
min_inputssets the minimal numbers of feature for input matrix in
Returns
the number of loaded instances from the dataset
int OpenANN::LibSVM::load ( Eigen::MatrixXd &  in,
Eigen::MatrixXd &  out,
std::istream &  stream,
int  min_inputs = 0 
)

Read a libsvm-encoded dataset from any input stream and load its values into given in- and output matrices.

Parameters
ininput matrix with an unspecific dimension that will contain the data
outoutput matrix with an unspecific dimension that will contain the data.
streamgeneral STL data stream for getting libsvm-encoded datasets
min_inputssets the minimal numbers of feature for input matrix in
Returns
the number of loaded instances from the dataset
void OpenANN::LibSVM::save ( const Eigen::MatrixXd &  in,
const Eigen::MatrixXd &  out,
const char *  filename 
)

Export a given dataset represented by in- and output matrices into a libsvm file.

Parameters
inmatrix containing all input values (features)
outmatrix containt all output values (classes, targets)
filenamename to the generating libsvm dataset file
void OpenANN::LibSVM::save ( const Eigen::MatrixXd &  in,
const Eigen::MatrixXd &  out,
std::ostream &  stream 
)

Write a given dataset from in- and output matrices to an output stream in libsvm format.

Parameters
inmatrix containing all input values (features)
outmatrix containt all output values (classes, targets)
streamgeneral STL data stream that will receive libsvm encoded dataset