#include <shark/Data/DataDistribution.h>
Public Member Functions | |
CircleInSquare (unsigned int dimensions=2, double noiselevel=0.0, bool class_prob_equal=false) | |
void | setLimits (double lower_limit, double upper_limit, double inner_radius, double outer_radius) |
allow for arbitrary box limits More... | |
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_dimensions |
double | m_noiselevel |
double | m_lowerLimit |
double | m_upperLimit |
double | m_centerpoint |
double | m_inner_radius2 |
double | m_outer_radius2 |
bool | m_equal_class_prob |
if true, the probability to belong to either class is equal. if false, it is uniform over the cube. More... | |
This class randomly fills a (hyper-)square with data points. Points which happen to be within a (hyper-)circle centered in the square of a certain radius get a positive class label. Noise on the labels can be added.
Definition at line 253 of file DataDistribution.h.
|
inline |
Definition at line 256 of file DataDistribution.h.
|
inlinevirtual |
Generates a single pair of input and label.
input | the generated input |
label | the generated label |
Implements shark::LabeledDataDistribution< RealVector, unsigned int >.
Definition at line 280 of file DataDistribution.h.
References shark::random::coinToss(), shark::random::globalRng, and shark::random::uni().
|
inline |
allow for arbitrary box limits
Definition at line 268 of file DataDistribution.h.
References RANGE_CHECK.
|
protected |
Definition at line 331 of file DataDistribution.h.
|
protected |
Definition at line 327 of file DataDistribution.h.
|
protected |
if true, the probability to belong to either class is equal. if false, it is uniform over the cube.
Definition at line 334 of file DataDistribution.h.
|
protected |
Definition at line 332 of file DataDistribution.h.
|
protected |
Definition at line 329 of file DataDistribution.h.
|
protected |
Definition at line 328 of file DataDistribution.h.
|
protected |
Definition at line 333 of file DataDistribution.h.
|
protected |
Definition at line 330 of file DataDistribution.h.