shark::UnlabeledData< InputT > Class Template Reference

data set for unbase_typevised learning More...

#include <shark/Data/Dataset.h>

+ Inheritance diagram for shark::UnlabeledData< InputT >:
+ Collaboration 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
< typename
Container::element_iterator
element_range
 
typedef boost::iterator_range
< typename
Container::const_element_iterator
const_element_range
 
typedef boost::iterator_range
< typename Container::iterator
batch_range
 
typedef boost::iterator_range
< typename
Container::const_iterator
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...
 
self_type operator= (Data< InputT > const &data)
 we allow assignment from Data. More...
 
self_typeinputs ()
 Access to the base_type class as "inputs". More...
 
self_type const & inputs () const
 Access to the base_type class as "inputs". More...
 
self_type 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...
 
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...
 
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 (Data const &container, std::vector< std::size_t > batchSizes)
 Construct a dataset with different batch sizes as a copy of another dataset. 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)
 
self_type 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...
 
void repartition (Range const &batchSizes)
 Reorders the batch structure in the container to that indicated by the batchSizes vector. More...
 
void indexedSubset (IndexSet const &indices, self_type &subset) const
 Fill in the subset defined by the list of indices. More...
 
void indexedSubset (IndexSet const &indices, self_type &subset, self_type &complement) const
 Fill in the subset defined by the list of indices as well as its complement. More...
 
- 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...
 

Detailed Description

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

data set for unbase_typevised learning

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 344 of file Dataset.h.

Member Typedef Documentation

template<class InputT>
typedef detail::SharedContainer<InputT> shark::UnlabeledData< InputT >::InputContainer

Definition at line 351 of file Dataset.h.

template<class InputT>
typedef element_type shark::UnlabeledData< InputT >::InputType

Definition at line 350 of file Dataset.h.

Constructor & Destructor Documentation

template<class InputT>
shark::UnlabeledData< InputT >::UnlabeledData ( )
inline

Constructor.

Definition at line 358 of file Dataset.h.

template<class InputT>
shark::UnlabeledData< InputT >::UnlabeledData ( Data< InputT > const &  points)
inline

Construction from data.

Definition at line 367 of file Dataset.h.

template<class InputT>
shark::UnlabeledData< InputT >::UnlabeledData ( std::size_t  size,
element_type const &  element,
std::size_t  batchSize = base_type::DefaultBatchSize 
)
inline

Construction with size and a single element.

Optionally the desired batch Size can be set

Parameters
sizethe new size of the container
elementthe blueprint element from which to create the Container
batchSizethe size of the batches. if this is 0, the size is unlimited

Definition at line 378 of file Dataset.h.

template<class InputT>
shark::UnlabeledData< InputT >::UnlabeledData ( std::size_t  numBatches)
inline

Create an empty set with just the correct number of batches.

The user must initialize the dataset after that by himself.

Definition at line 385 of file Dataset.h.

template<class InputT>
shark::UnlabeledData< InputT >::UnlabeledData ( UnlabeledData< InputT > const &  container,
std::vector< std::size_t >  batchSizes 
)
inline

Construct a dataset with different batch sizes. it is a copy of the other dataset.

Definition at line 390 of file Dataset.h.

Member Function Documentation

template<class InputT>
self_type& shark::UnlabeledData< InputT >::inputs ( )
inline

Access to the base_type class as "inputs".

Added for consistency with the LabeledData::labels() method.

Definition at line 402 of file Dataset.h.

template<class InputT>
self_type const& shark::UnlabeledData< InputT >::inputs ( ) const
inline

Access to the base_type class as "inputs".

Added for consistency with the LabeledData::labels() method.

Definition at line 409 of file Dataset.h.

template<class InputT>
self_type shark::UnlabeledData< InputT >::operator= ( Data< InputT > const &  data)
inline

we allow assignment from Data.

Definition at line 394 of file Dataset.h.

template<class InputT>
virtual void shark::UnlabeledData< InputT >::shuffle ( )
inlinevirtual

shuffles all elements in the entire dataset (that is, also across the batches)

Definition at line 424 of file Dataset.h.

template<class InputT>
self_type shark::UnlabeledData< InputT >::splice ( std::size_t  batch)
inline

Splits the container in two independent parts. The left part remains in the container, the right is stored as return type.

Order of elements remain unchanged. The SharedVector is not allowed to be shared for this to work.

Definition at line 417 of file Dataset.h.

Referenced by shark::LabeledData< InputType, LabelType >::splice().


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