OpenANN
1.1.0
An open source library for artificial neural networks.
|
Resampled dataset based on the original dataset. More...
#include <WeightedDataSet.h>
Public Member Functions | |
WeightedDataSet (DataSet &dataSet, const Eigen::VectorXd &weights, bool deterministic) | |
WeightedDataSet & | updateWeights (const Eigen::VectorXd &weights) |
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 n) |
Get the input of the ith instance. More... | |
virtual Eigen::VectorXd & | getTarget (int n) |
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 () |
Resampled dataset based on the original dataset.
The probability of each instance to occur in the dataset is defined by the given weights. Note that the weights must sum up to one.
OpenANN::WeightedDataSet::WeightedDataSet | ( | DataSet & | dataSet, |
const Eigen::VectorXd & | weights, | ||
bool | deterministic | ||
) |
dataSet | original dataset |
weights | weights for each instance, must sum up to one |
deterministic | use deterministic (roulette wheel) sampling |
|
inlinevirtual |
This function is called after an iteration of the optimization algorithm.
It could log results, modify or extend the data set or whatever.
learner | learned model |
Implements OpenANN::DataSet.
|
virtual |
Get the input of the ith instance.
n | number of instance |
Implements OpenANN::DataSet.
|
virtual |
Get the output of the ith instance.
n | number of instance |
Implements OpenANN::DataSet.
|
virtual |
|
virtual |
|
virtual |
Number of instances.
Assumes that the data set has a fixed size, at least for one iteration of the optimization algorithm.
Implements OpenANN::DataSet.
WeightedDataSet& OpenANN::WeightedDataSet::updateWeights | ( | const Eigen::VectorXd & | weights) |