shark::DataDistribution< InputType > Class Template Referenceabstract

A DataDistribution defines an unsupervised learning problem. More...

#include <shark/Data/DataDistribution.h>

Public Member Functions

virtual ~DataDistribution ()
 Virtual destructor. More...
 
virtual void draw (InputType &input) const =0
 Generates a single pair of input and label. More...
 
InputType operator() ()
 
UnlabeledData< InputTypegenerateDataset (std::size_t size, std::size_t maximumBatchSize) const
 Generates a data set with samples from from the distribution. More...
 
UnlabeledData< InputTypegenerateDataset (std::size_t size) const
 Generates a data set with samples from from the distribution. More...
 

Detailed Description

template<class InputType>
class shark::DataDistribution< InputType >

A DataDistribution defines an unsupervised learning problem.

The unsupervised learning problem is defined by an explicit distribution (in contrast to a finite dataset). The only method we need is to draw a sample from the distribution.

Definition at line 57 of file DataDistribution.h.

Constructor & Destructor Documentation

◆ ~DataDistribution()

template<class InputType>
virtual shark::DataDistribution< InputType >::~DataDistribution ( )
inlinevirtual

Virtual destructor.

Definition at line 61 of file DataDistribution.h.

Member Function Documentation

◆ draw()

◆ generateDataset() [1/2]

template<class InputType>
UnlabeledData<InputType> shark::DataDistribution< InputType >::generateDataset ( std::size_t  size,
std::size_t  maximumBatchSize 
) const
inline

Generates a data set with samples from from the distribution.

Parameters
sizethe number of samples in the dataset
maximumBatchSizethe maximum size of a batch

Definition at line 79 of file DataDistribution.h.

Referenced by shark::DataDistribution< RealVector >::generateDataset(), and shark::LabeledDataDistribution< RealVector, unsigned int >::generateDataset().

◆ generateDataset() [2/2]

template<class InputType>
UnlabeledData<InputType> shark::DataDistribution< InputType >::generateDataset ( std::size_t  size) const
inline

Generates a data set with samples from from the distribution.

Parameters
sizethe number of samples in the dataset

Definition at line 93 of file DataDistribution.h.

◆ operator()()

template<class InputType>
InputType shark::DataDistribution< InputType >::operator() ( )
inline

Definition at line 69 of file DataDistribution.h.


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