#include <shark/Data/DataDistribution.h>
Inheritance diagram for shark::CircleInSquare: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 281 of file DataDistribution.h.
|
inline |
Definition at line 284 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 308 of file DataDistribution.h.
References shark::coinToss(), and shark::uni().
|
inline |
allow for arbitrary box limits
Definition at line 296 of file DataDistribution.h.
References RANGE_CHECK.
|
protected |
Definition at line 359 of file DataDistribution.h.
|
protected |
Definition at line 355 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 362 of file DataDistribution.h.
|
protected |
Definition at line 360 of file DataDistribution.h.
|
protected |
Definition at line 357 of file DataDistribution.h.
|
protected |
Definition at line 356 of file DataDistribution.h.
|
protected |
Definition at line 361 of file DataDistribution.h.
|
protected |
Definition at line 358 of file DataDistribution.h.