Statismo  0.10.1
 All Classes Namespaces Functions Typedefs
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
statismo::DataManagerWithSurrogates< T > Class Template Reference

Manages Training and Test Data for building Statistical Models and provides functionality for Crossvalidation. Manages data together with surrogate information. The surrogate variables are provided through a vector (see DataManager), and can contain both continuous or categorical data. The surrogate data is provided through files. One file for each dataset, and one file describing the types of surrogates. This file is also an ascii file with space or EOL separated values. Those values are either 0 or 1, standing for respectively categorical or continuous variable. This class does not support any missing data, so each dataset must come with a surrogate data file, all of which must contain the same number of entries as the type-file. More...

#include <DataManagerWithSurrogates.h>

Inheritance diagram for statismo::DataManagerWithSurrogates< T >:
Inheritance graph

Public Types

typedef Representer< T > RepresenterType
 
typedef
RepresenterType::DatasetPointerType 
DatasetPointerType
 
typedef
RepresenterType::DatasetConstPointerType 
DatasetConstPointerType
 
typedef DataItemWithSurrogates< T > DataItemWithSurrogatesType
 
typedef
DataItemWithSurrogatesType::SurrogateTypeVectorType 
SurrogateTypeVectorType
 
- Public Types inherited from statismo::DataManager< T >
typedef Representer< T > RepresenterType
 
typedef
RepresenterType::DatasetPointerType 
DatasetPointerType
 
typedef
RepresenterType::DatasetConstPointerType 
DatasetConstPointerType
 
typedef DataItem< T > DataItemType
 
typedef DataItemWithSurrogates< T > DataItemWithSurrogatesType
 
typedef std::list< const
DataItemType * > 
DataItemListType
 
typedef CrossValidationFold< T > CrossValidationFoldType
 
typedef std::list
< CrossValidationFoldType
CrossValidationFoldListType
 

Public Member Functions

virtual ~DataManagerWithSurrogates ()
 
void AddDatasetWithSurrogates (DatasetConstPointerType ds, const std::string &datasetURI, const std::string &surrogateFilename)
 
SurrogateTypeVectorType GetSurrogateTypes () const
 
std::string GetSurrogateTypeFilename () const
 
SurrogateTypeInfoType GetSurrogateTypeInfo () const
 
- Public Member Functions inherited from statismo::DataManager< T >
void Delete ()
 
virtual ~DataManager ()
 
virtual void AddDataset (DatasetConstPointerType dataset, const std::string &URI)
 
virtual void Save (const std::string &filename) const
 
DataItemListType GetData () const
 
unsigned GetNumberOfSamples () const
 
CrossValidationFoldListType GetCrossValidationFolds (unsigned nFolds, bool randomize=true) const
 
CrossValidationFoldListType GetLeaveOneOutCrossValidationFolds () const
 

Static Public Member Functions

static
DataManagerWithSurrogates< T > * 
Create (const RepresenterType *representer, const std::string &surrogTypeFilename)
 
- Static Public Member Functions inherited from statismo::DataManager< T >
static DataManager< T > * Create (const RepresenterType *representer)
 
static DataManager< T > * Load (Representer< T > *representer, const std::string &filename)
 

Protected Member Functions

void LoadSurrogateTypes (const std::string &filename)
 
 DataManagerWithSurrogates (const RepresenterType *r, const std::string &filename)
 
 DataManagerWithSurrogates (const DataManagerWithSurrogates &orig)
 
DataManagerWithSurrogatesoperator= (const DataManagerWithSurrogates &rhs)
 
- Protected Member Functions inherited from statismo::DataManager< T >
 DataManager (const RepresenterType *representer)
 
 DataManager (const DataManager< T > &orig)
 
DataManageroperator= (const DataManager< T > &rhs)
 

Protected Attributes

SurrogateTypeInfoType m_typeInfo
 
- Protected Attributes inherited from statismo::DataManager< T >
RepresenterType * m_representer
 
DataItemListType m_DataItemList
 

Detailed Description

template<typename T>
class statismo::DataManagerWithSurrogates< T >

Manages Training and Test Data for building Statistical Models and provides functionality for Crossvalidation. Manages data together with surrogate information. The surrogate variables are provided through a vector (see DataManager), and can contain both continuous or categorical data. The surrogate data is provided through files. One file for each dataset, and one file describing the types of surrogates. This file is also an ascii file with space or EOL separated values. Those values are either 0 or 1, standing for respectively categorical or continuous variable. This class does not support any missing data, so each dataset must come with a surrogate data file, all of which must contain the same number of entries as the type-file.

See Also
DataManager

Constructor & Destructor Documentation

template<typename T>
virtual statismo::DataManagerWithSurrogates< T >::~DataManagerWithSurrogates ( )
inlinevirtual

Destructor

Member Function Documentation

template<typename T >
void statismo::DataManagerWithSurrogates< T >::AddDatasetWithSurrogates ( DatasetConstPointerType  ds,
const std::string &  datasetURI,
const std::string &  surrogateFilename 
)

Add a dataset, together with surrogate information

Parameters
datasetFilename
datasetURI(An URI for the dataset. This info is only added to the metadata).
surrogateFilename
template<typename T>
static DataManagerWithSurrogates<T>* statismo::DataManagerWithSurrogates< T >::Create ( const RepresenterType *  representer,
const std::string &  surrogTypeFilename 
)
inlinestatic

Factory method that creates a new instance of a DataManager class

template<typename T>
std::string statismo::DataManagerWithSurrogates< T >::GetSurrogateTypeFilename ( ) const
inline

Returns the source filename defining the surrogate types

template<typename T>
SurrogateTypeInfoType statismo::DataManagerWithSurrogates< T >::GetSurrogateTypeInfo ( ) const
inline

Get a structure containing the type info: vector of types, and source filename

template<typename T>
SurrogateTypeVectorType statismo::DataManagerWithSurrogates< T >::GetSurrogateTypes ( ) const
inline

Get a vector indicating the types of surrogates variables (Categorical vs Continuous)

template<typename T >
void statismo::DataManagerWithSurrogates< T >::LoadSurrogateTypes ( const std::string &  filename)
protected

Loads the information concerning the types of the surrogates variables (categorical=0, continuous=1) => it is assumed to be in a text file with the entries separated by spaces or EOL character


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