shark::Chessboard Class Reference

"chess board" problem for binary classification More...

#include <shark/Data/DataDistribution.h>

+ Inheritance diagram for shark::Chessboard:

Public Member Functions

 Chessboard (unsigned int size=4, double noiselevel=0.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
 
double m_noiselevel
 

Detailed Description

"chess board" problem for binary classification

Definition at line 154 of file DataDistribution.h.

Constructor & Destructor Documentation

◆ Chessboard()

shark::Chessboard::Chessboard ( unsigned int  size = 4,
double  noiselevel = 0.0 
)
inline

Definition at line 157 of file DataDistribution.h.

Member Function Documentation

◆ draw()

void shark::Chessboard::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 164 of file DataDistribution.h.

References shark::random::globalRng, and shark::random::uni().

Member Data Documentation

◆ m_noiselevel

double shark::Chessboard::m_noiselevel
protected

Definition at line 179 of file DataDistribution.h.

◆ m_size

unsigned int shark::Chessboard::m_size
protected

Definition at line 178 of file DataDistribution.h.


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