#include <ArtificialDistributions.h>

Public Member Functions | |
| SparseDistribution (int n, int m, int k) | |
| Constructor. | |
| ~SparseDistribution () | |
| Destructor. | |
| bool | GetData (Array< double > &data, Array< double > &target, int count) |
| This function generates examples drawn i.i.d. | |
Protected Attributes | |
| int | dim1 |
| int | dim2 |
| int | num |
(2n+m)-dimensional distribution with sparse binary values. Every example from this distribution consists of a vector with k ones and 2n+m-k zeros. The first one is within the first n coordinates for positive and in the second n variables for negative class examples. The remaining ones are drawn independently among the remaining variables.
Definition at line 176 of file ArtificialDistributions.h.
| SparseDistribution::SparseDistribution | ( | int | n, | |
| int | m, | |||
| int | k | |||
| ) |
Constructor.
Definition at line 204 of file ArtificialDistributions.cpp.
References DataSource::dataDim, dim1, dim2, num, and DataSource::targetDim.
| SparseDistribution::~SparseDistribution | ( | ) |
| bool SparseDistribution::GetData | ( | Array< double > & | data, | |
| Array< double > & | target, | |||
| int | count | |||
| ) | [virtual] |
This function generates examples drawn i.i.d.
from the distribution.
Implements DataSource.
Definition at line 219 of file ArtificialDistributions.cpp.
int SparseDistribution::dim1 [protected] |
Definition at line 191 of file ArtificialDistributions.h.
Referenced by GetData(), and SparseDistribution().
int SparseDistribution::dim2 [protected] |
Definition at line 192 of file ArtificialDistributions.h.
Referenced by GetData(), and SparseDistribution().
int SparseDistribution::num [protected] |
Definition at line 193 of file ArtificialDistributions.h.
Referenced by GetData(), and SparseDistribution().