shark::DiagonalWithCircle Class Reference

#include <shark/Data/DataDistribution.h>

+ Inheritance diagram for shark::DiagonalWithCircle:

Public Member Functions

 DiagonalWithCircle (double radius=1.0, double noise=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

double m_radius2
double m_noiselevel

Detailed Description

Definition at line 342 of file DataDistribution.h.

Constructor & Destructor Documentation

◆ DiagonalWithCircle()

shark::DiagonalWithCircle::DiagonalWithCircle ( double  radius = 1.0,
double  noise = 0.0 

Definition at line 345 of file DataDistribution.h.

Member Function Documentation

◆ draw()

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

Generates a single pair of input and label.

inputthe generated input
labelthe generated label

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

Definition at line 350 of file DataDistribution.h.

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

Member Data Documentation

◆ m_noiselevel

double shark::DiagonalWithCircle::m_noiselevel

Definition at line 374 of file DataDistribution.h.

◆ m_radius2

double shark::DiagonalWithCircle::m_radius2

Definition at line 373 of file DataDistribution.h.

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