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
OpenANN::DataStream Class Reference

Streams training data for online training. More...

#include <DataStream.h>

Public Member Functions

 DataStream (int cacheSize)
 Create a data stream. More...
 
 ~DataStream ()
 
DataStreamsetLearner (Learner &learner)
 Add a learner. More...
 
DataStreamsetOptimizer (Optimizer &opt)
 Add an optimizer. More...
 
void addSample (Eigen::VectorXd *x, Eigen::VectorXd *t=0)
 Add a sample of the data distribution. More...
 

Detailed Description

Streams training data for online training.

A DataStream combines a learner and an optimizer. It is able to cache training data and will start an optimization epoch if the cache is full. Training instances will be added incrementally with DataStream::addSample(). The optimization algorithm that will be passed with DataStream::setOptimizer() should work for online learning like e.g. MBSGD.

Constructor & Destructor Documentation

OpenANN::DataStream::DataStream ( int  cacheSize)

Create a data stream.

Parameters
cacheSizesize of the internal data cache
OpenANN::DataStream::~DataStream ( )

Member Function Documentation

void OpenANN::DataStream::addSample ( Eigen::VectorXd *  x,
Eigen::VectorXd *  t = 0 
)

Add a sample of the data distribution.

This will start an optimization epoch if the cache is full.

Parameters
xinput
ttarget (can be 0 for unsupervised learning)
DataStream& OpenANN::DataStream::setLearner ( Learner learner)

Add a learner.

Parameters
learnermodel
Returns
this for chaining
DataStream& OpenANN::DataStream::setOptimizer ( Optimizer opt)

Add an optimizer.

Parameters
optonline optimization algorithm
Returns
this for chaining

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