OpenANN
1.1.0
An open source library for artificial neural networks.
Main Page
Classes
Files
List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenANN
io
WeightedDataSet.h
Go to the documentation of this file.
1
#ifndef OPENANN_WEIGHTED_DATA_SET_H_
2
#define OPENANN_WEIGHTED_DATA_SET_H_
3
4
#include <
OpenANN/io/DataSet.h
>
5
#include <vector>
6
7
namespace
OpenANN
8
{
9
18
class
WeightedDataSet
:
public
DataSet
19
{
20
DataSet
& dataSet;
21
Eigen::VectorXd weights;
22
bool
deterministic;
23
std::vector<int> originalIndices;
24
public
:
30
WeightedDataSet
(
DataSet
& dataSet,
const
Eigen::VectorXd& weights,
31
bool
deterministic);
32
WeightedDataSet
&
updateWeights
(
const
Eigen::VectorXd& weights);
33
virtual
int
samples
();
34
virtual
int
inputs
();
35
virtual
int
outputs
();
36
virtual
Eigen::VectorXd&
getInstance
(
int
n);
37
virtual
Eigen::VectorXd&
getTarget
(
int
n);
38
virtual
void
finishIteration
(
Learner
& learner) {}
39
private
:
40
void
resample();
41
};
42
43
}
// namespace OpenANN
44
45
#endif // OPENANN_WEIGHTED_DATA_SET_H_
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by
1.8.4