OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
OpenANN::DirectStorageDataSet Class Reference

Stores the inputs and outputs of the data set directly in two matrices. More...

#include <DirectStorageDataSet.h>

+ Inheritance diagram for OpenANN::DirectStorageDataSet:

Public Member Functions

 DirectStorageDataSet (Eigen::MatrixXd *in, Eigen::MatrixXd *out=0, Evaluator *evaluator=0)
 Create an instance of DirectStorageDataSet. More...
 
virtual int samples ()
 Number of instances. More...
 
virtual int inputs ()
 Input dimensions of instances. More...
 
virtual int outputs ()
 Output dimensions of instances. More...
 
virtual Eigen::VectorXd & getInstance (int i)
 Get the input of the ith instance. More...
 
virtual Eigen::VectorXd & getTarget (int i)
 Get the output of the ith instance. More...
 
virtual void finishIteration (Learner &learner)
 This function is called after an iteration of the optimization algorithm. More...
 
- Public Member Functions inherited from OpenANN::DataSet
virtual ~DataSet ()
 

Protected Attributes

Eigen::MatrixXd * in
 
Eigen::MatrixXd * out
 
const int N
 
const int D
 
const int F
 
Eigen::VectorXd temporaryInput
 
Eigen::VectorXd temporaryOutput
 
Evaluatorevaluator
 Do not delete the evaluator! More...
 

Detailed Description

Stores the inputs and outputs of the data set directly in two matrices.

The data set can log results during optimization.

Constructor & Destructor Documentation

OpenANN::DirectStorageDataSet::DirectStorageDataSet ( Eigen::MatrixXd *  in,
Eigen::MatrixXd *  out = 0,
Evaluator evaluator = 0 
)

Create an instance of DirectStorageDataSet.

Parameters
incontains an instance in each row
outcointains a target in each row
evaluatormonitors optimization progress

Member Function Documentation

virtual void OpenANN::DirectStorageDataSet::finishIteration ( Learner learner)
virtual

This function is called after an iteration of the optimization algorithm.

It could log results, modify or extend the data set or whatever.

Parameters
learnerlearned model

Implements OpenANN::DataSet.

virtual Eigen::VectorXd& OpenANN::DirectStorageDataSet::getInstance ( int  n)
virtual

Get the input of the ith instance.

Parameters
nnumber of instance
Returns
input

Implements OpenANN::DataSet.

virtual Eigen::VectorXd& OpenANN::DirectStorageDataSet::getTarget ( int  n)
virtual

Get the output of the ith instance.

Parameters
nnumber of instance
Returns
output

Implements OpenANN::DataSet.

virtual int OpenANN::DirectStorageDataSet::inputs ( )
inlinevirtual

Input dimensions of instances.

Returns
number of inputs

Implements OpenANN::DataSet.

virtual int OpenANN::DirectStorageDataSet::outputs ( )
inlinevirtual

Output dimensions of instances.

Returns
number of outputs

Implements OpenANN::DataSet.

virtual int OpenANN::DirectStorageDataSet::samples ( )
inlinevirtual

Number of instances.

Assumes that the data set has a fixed size, at least for one iteration of the optimization algorithm.

Returns
number of examples

Implements OpenANN::DataSet.

Member Data Documentation

const int OpenANN::DirectStorageDataSet::D
protected
Evaluator* OpenANN::DirectStorageDataSet::evaluator
protected

Do not delete the evaluator!

const int OpenANN::DirectStorageDataSet::F
protected
Eigen::MatrixXd* OpenANN::DirectStorageDataSet::in
protected
const int OpenANN::DirectStorageDataSet::N
protected
Eigen::MatrixXd* OpenANN::DirectStorageDataSet::out
protected
Eigen::VectorXd OpenANN::DirectStorageDataSet::temporaryInput
protected
Eigen::VectorXd OpenANN::DirectStorageDataSet::temporaryOutput
protected

The documentation for this class was generated from the following file: