X-Boost  2.3.8
Public Types | Public Member Functions | Public Attributes | List of all members
DataSetHandle< Aggregator > Struct Template Reference

#include <DataSet.h>

Inherits ParamType.

Inherited by DataSet< Aggregator >, and DecisionTreeLearner< Aggregator >.

Public Types

typedef DataSetHandle< Aggregator > ViewType
 a soft copy of the set
 
typedef DataSet< Aggregator > StoreType
 an hard copy of the set
 

Public Member Functions

template<class SrcAggregator >
 DataSetHandle (const DataSetHandle< SrcAggregator > &src)
 
void Clear ()
 Reset (but not release memory)
 
unsigned int Size () const
 Return number of allocated samples (complete size of DataSet)
 
void SetParams (const ParamType &src)
 
const ParamType & GetParams () const
 
void Insert (const PatternType &p)
 add a new pattern to the list
 
void Release ()
 Force, manually, to release memory in data.
 
template<class SrcAggregator >
void operator= (const DataSetHandle< SrcAggregator > &src)
 
void Import (const DataType &data, int category)
 

Public Attributes

DECLARE_AGGREGATOR typedef
std::vector< PatternType > 
ListType
 
unsigned int n_patternP
 
unsigned int n_patternN
 
ListType templates
 a collection of Pattern used in this dataset
 

Detailed Description

template<class Aggregator>
struct DataSetHandle< Aggregator >

A collection of "Patterns", preprocessed data.

Pattern contains all data usefull for train (algorithm dependent data). A dataset that collect pattern but not remove them in the destroyer automatically

Note
only for binary classifier, for multiclass problem
See also
MultiClassDataSetHandle

Il DataSet deve contenere un vettore di Dati+DatiExtraAlgoritmo oltre ai Parametri per poter estrarre le feature dai Dati. Permette la conversione tra DataSetHandle, copiando solo il descrittore.

TPatternType the type of pattern. Must have at least category member. TParamType parameters of DataType (inside Pattern) to declare the data (for example width,height). Parameters common to all the DataType

[Training]

Constructor & Destructor Documentation

template<class Aggregator>
template<class SrcAggregator >
DataSetHandle< Aggregator >::DataSetHandle ( const DataSetHandle< SrcAggregator > &  src)
inlineexplicit

DataSet conversion costructor. Used to convert a Patern type to an extended Pattern type (for example AdaBoostPattern)

Member Function Documentation

template<class Aggregator >
void DataSetHandle< Aggregator >::Import ( const DataType &  data,
int  category 
)

Import data inside the set

Note
buf will be freed inside this library at release
template<class Aggregator>
template<class SrcAggregator >
void DataSetHandle< Aggregator >::operator= ( const DataSetHandle< SrcAggregator > &  src)
inline

copy operator (copy and convert)

Note
do not release old memory since it is inside the DataSetHandle
template<class Aggregator>
void DataSetHandle< Aggregator >::SetParams ( const ParamType &  src)
inline

Set the geometry of patterns. All pattern must have the same geometry.

Member Data Documentation

template<class Aggregator>
unsigned int DataSetHandle< Aggregator >::n_patternP

Number of patterns in two dataset (P: Positive, N: Negative)

See also
MultiClassDataSetHandle TODO: use an array n_pattern[2] ?

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