OpenANN
1.1.0
An open source library for artificial neural networks.
|
Streams training data for online training. More...
#include <DataStream.h>
Public Member Functions | |
DataStream (int cacheSize) | |
Create a data stream. More... | |
~DataStream () | |
DataStream & | setLearner (Learner &learner) |
Add a learner. More... | |
DataStream & | setOptimizer (Optimizer &opt) |
Add an optimizer. More... | |
void | addSample (Eigen::VectorXd *x, Eigen::VectorXd *t=0) |
Add a sample of the data distribution. More... | |
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.
OpenANN::DataStream::DataStream | ( | int | cacheSize) |
Create a data stream.
cacheSize | size of the internal data cache |
OpenANN::DataStream::~DataStream | ( | ) |
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.
x | input |
t | target (can be 0 for unsupervised learning) |
DataStream& OpenANN::DataStream::setLearner | ( | Learner & | learner) |
Add a learner.
learner | model |
DataStream& OpenANN::DataStream::setOptimizer | ( | Optimizer & | opt) |
Add an optimizer.
opt | online optimization algorithm |