shark::UnlabeledData< InputT > Class Template Reference

Data set for unsupervised learning. More...

#include <shark/Data/Dataset.h>

+ Inheritance diagram for shark::UnlabeledData< InputT >:

Public Types

typedef element_type InputType
 
typedef detail::SharedContainer< InputT > InputContainer
 
- Public Types inherited from shark::Data< InputT >
typedef batch_type & batch_reference
 
typedef batch_type const & const_batch_reference
 
typedef Batch< element_type >::reference element_reference
 
typedef Batch< element_type >::const_reference const_element_reference
 
typedef std::vector< std::size_t > IndexSet
 
typedef boost::iterator_range< detail::DataElementIterator< Data< InputT > > > element_range
 
typedef boost::iterator_range< detail::DataElementIterator< Data< InputT > const > > const_element_range
 
typedef detail::BatchRange< Data< InputT > > batch_range
 
typedef detail::BatchRange< Data< InputT > const > const_batch_range
 

Public Member Functions

 UnlabeledData ()
 Constructor. More...
 
 UnlabeledData (Data< InputT > const &points)
 Construction from data. More...
 
 UnlabeledData (std::size_t size, element_type const &element, std::size_t batchSize=base_type::DefaultBatchSize)
 Construction with size and a single element. More...
 
 UnlabeledData (std::size_t numBatches)
 Create an empty set with just the correct number of batches. More...
 
 UnlabeledData (UnlabeledData const &container, std::vector< std::size_t > batchSizes)
 Construct a dataset with different batch sizes. it is a copy of the other dataset. More...
 
UnlabeledData operator= (Data< InputT > const &data)
 we allow assignment from Data. More...
 
UnlabeledDatainputs ()
 Access to the base_type class as "inputs". More...
 
UnlabeledData const & inputs () const
 Access to the base_type class as "inputs". More...
 
UnlabeledData splice (std::size_t batch)
 Splits the container in two independent parts. The left part remains in the container, the right is stored as return type. More...
 
virtual void shuffle ()
 shuffles all elements in the entire dataset (that is, also across the batches) More...
 
- Public Member Functions inherited from shark::Data< InputT >
 BOOST_STATIC_CONSTANT (std::size_t, DefaultBatchSize=256)
 Defines the default batch size of the Container. More...
 
bool operator== (const Data< T > &rhs)
 Two containers compare equal if they share the same data. More...
 
bool operator!= (const Data< T > &rhs)
 Two containers compare unequal if they don't share the same data. More...
 
const_element_range elements () const
 Returns the range of elements. More...
 
element_range elements ()
 Returns therange of elements. More...
 
const_batch_range batches () const
 Returns the range of batches. More...
 
batch_range batches ()
 Returns the range of batches. More...
 
std::size_t numberOfBatches () const
 Returns the number of batches of the set. More...
 
std::size_t numberOfElements () const
 Returns the total number of elements. More...
 
Shape const & shape () const
 Returns the shape of the elements in the dataset. More...
 
Shapeshape ()
 Returns the shape of the elements in the dataset. More...
 
bool empty () const
 Check whether the set is empty. More...
 
element_reference element (std::size_t i)
 
const_element_reference element (std::size_t i) const
 
batch_reference batch (std::size_t i)
 
const_batch_reference batch (std::size_t i) const
 
 Data ()
 Constructor which constructs an empty set. More...
 
 Data (std::size_t numBatches)
 Construct a dataset with empty batches. More...
 
 Data (std::size_t size, element_type const &element, std::size_t batchSize=DefaultBatchSize)
 Construction with size and a single element. More...
 
void read (InArchive &archive)
 Read the component from the supplied archive. More...
 
void write (OutArchive &archive) const
 Write the component to the supplied archive. More...
 
virtual void makeIndependent ()
 This method makes the vector independent of all siblings and parents. More...
 
void splitBatch (std::size_t batch, std::size_t elementIndex)
 
Data splice (std::size_t batch)
 Splits the container into two independent parts. The front part remains in the container, the back part is returned. More...
 
void append (Data const &other)
 Appends the contents of another data object to the end. More...
 
void push_back (const_batch_reference batch)
 
void repartition (Range const &batchSizes)
 Reorders the batch structure in the container to that indicated by the batchSizes vector. More...
 
std::vector< std::size_t > getPartitioning () const
 Creates a vector with the batch sizes of every batch. More...
 
void indexedSubset (IndexSet const &indices, Data &subset, Data &complement) const
 Fill in the subset defined by the list of indices as well as its complement. More...
 
Data indexedSubset (IndexSet const &indices) const
 
- Public Member Functions inherited from shark::ISerializable
virtual ~ISerializable ()
 Virtual d'tor. More...
 
void load (InArchive &archive, unsigned int version)
 Versioned loading of components, calls read(...). More...
 
void save (OutArchive &archive, unsigned int version) const
 Versioned storing of components, calls write(...). More...
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

Additional Inherited Members

- Protected Types inherited from shark::Data< InputT >
typedef detail::SharedContainer< InputT > Container
 
- Protected Attributes inherited from shark::Data< InputT >
Container m_data
 data More...
 
Shape m_shape
 shape of a datapoint More...
 

Detailed Description

template<class InputT>
class shark::UnlabeledData< InputT >

Data set for unsupervised learning.

The UnlabeledData class is basically a standard Data container with the special interpretation of its data point being "inputs" to a learning algorithm.

Definition at line 373 of file Dataset.h.


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