shark::PamiToy Class Reference

#include <shark/Data/DataDistribution.h>

+ Inheritance diagram for shark::PamiToy:

Public Member Functions

 PamiToy (unsigned int size_useful=5, unsigned int size_noise=5, double noise_position=0.0, double noise_variance=1.0)
 
void draw (RealVector &input, unsigned int &label) const
 Generates a single pair of input and label. More...
 
- Public Member Functions inherited from shark::LabeledDataDistribution< RealVector, unsigned int >
virtual ~LabeledDataDistribution ()
 Virtual destructor. More...
 
std::pair< RealVector, unsigned int > operator() ()
 
LabeledData< RealVector, unsigned int > generateDataset (std::size_t size, std::size_t maximumBatchSize) const
 Generates a dataset with samples from from the distribution. More...
 
LabeledData< RealVector, unsigned int > generateDataset (std::size_t size) const
 Generates a data set with samples from from the distribution. More...
 

Protected Attributes

unsigned int m_size
 
unsigned int m_sizeUseful
 
unsigned int m_sizeNoise
 
double m_noisePos
 
double m_noiseVar
 

Detailed Description

"Pami Toy" problem for binary classification, as used in the article "Glasmachers and C. Igel. Maximum Likelihood Model Selection for 1-Norm Soft Margin SVMs with Multiple Parameters. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010." In summary, the first M dimensions are correlated to the labels, the last N dimensions are not.

Definition at line 217 of file DataDistribution.h.

Constructor & Destructor Documentation

◆ PamiToy()

shark::PamiToy::PamiToy ( unsigned int  size_useful = 5,
unsigned int  size_noise = 5,
double  noise_position = 0.0,
double  noise_variance = 1.0 
)
inline

Definition at line 220 of file DataDistribution.h.

Member Function Documentation

◆ draw()

void shark::PamiToy::draw ( RealVector &  input,
unsigned int &  label 
) const
inlinevirtual

Generates a single pair of input and label.

Parameters
inputthe generated input
labelthe generated label

Implements shark::LabeledDataDistribution< RealVector, unsigned int >.

Definition at line 228 of file DataDistribution.h.

References shark::random::discrete(), shark::random::gauss(), and shark::random::globalRng.

Member Data Documentation

◆ m_noisePos

double shark::PamiToy::m_noisePos
protected

Definition at line 246 of file DataDistribution.h.

◆ m_noiseVar

double shark::PamiToy::m_noiseVar
protected

Definition at line 247 of file DataDistribution.h.

◆ m_size

unsigned int shark::PamiToy::m_size
protected

Definition at line 243 of file DataDistribution.h.

◆ m_sizeNoise

unsigned int shark::PamiToy::m_sizeNoise
protected

Definition at line 245 of file DataDistribution.h.

◆ m_sizeUseful

unsigned int shark::PamiToy::m_sizeUseful
protected

Definition at line 244 of file DataDistribution.h.


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