CFeatures类参考


详细描述

The class Features is the base class of all feature objects.

It can be understood as a dense real valued feature matrix (with e.g. columns as single feature vectors), a set of strings, graphs or any other arbitrary collection of objects. As a result this class is kept very general and implements only very weak interfaces to

In addition it provides helpers to check e.g. for compability of feature objects.

Currently there are 3 general feature classes, which are CSimpleFeatures (dense matrices), CSparseFeatures (sparse matrices), CStringFeatures (a set of strings) from which all the specific features like CSimpleFeatures<float64_t> (dense real valued feature matrices) are derived.

在文件Features.h50行定义。

继承图,类CFeatures
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CFeatures (int32_t size=0)
 CFeatures (const CFeatures &orig)
 CFeatures (char *fname)
virtual CFeaturesduplicate () const =0
virtual ~CFeatures ()
virtual EFeatureType get_feature_type ()=0
virtual EFeatureClass get_feature_class ()=0
virtual int32_t add_preproc (CPreProc *p)
 set preprocessor
virtual CPreProcdel_preproc (int32_t num)
 del current preprocessor
CPreProcget_preproc (int32_t num)
 get current preprocessor
void set_preprocessed (int32_t num)
bool is_preprocessed (int32_t num)
int32_t get_num_preprocessed ()
 get whether specified preprocessor (or all if num=1) was/were already applied
int32_t get_num_preproc ()
void clean_preprocs ()
int32_t get_cache_size ()
virtual int32_t get_num_vectors ()=0
virtual bool reshape (int32_t num_features, int32_t num_vectors)
virtual int32_t get_size ()=0
void list_feature_obj ()
virtual bool load (char *fname)
virtual bool save (char *fname)
bool check_feature_compatibility (CFeatures *f)
bool has_property (EFeatureProperty p)
void set_property (EFeatureProperty p)
void unset_property (EFeatureProperty p)

构造及析构函数文档

CFeatures ( int32_t  size = 0  ) 

constructor

参数:
size cache size

在文件Features.cpp27行定义。

CFeatures ( const CFeatures orig  ) 

copy constructor

在文件Features.cpp34行定义。

CFeatures ( char *  fname  ) 

constructor

参数:
fname filename to load features from

在文件Features.cpp42行定义。

~CFeatures (  )  [virtual]

在文件Features.cpp50行定义。


成员函数文档

int32_t add_preproc ( CPreProc p  )  [virtual]

set preprocessor

add preprocessor

参数:
p preprocessor to set
返回:
something inty

在文件Features.cpp57行定义。

bool check_feature_compatibility ( CFeatures f  ) 

check feature compatibility

参数:
f features to check for compatibility
返回:
if features are compatible

在文件Features.cpp259行定义。

void clean_preprocs (  ) 

clears all preprocs

在文件Features.cpp113行定义。

CPreProc * del_preproc ( int32_t  num  )  [virtual]

del current preprocessor

delete preprocessor from list caller has to clean up returned preproc

参数:
num index of preprocessor in list

在文件Features.cpp119行定义。

virtual CFeatures* duplicate (  )  const [pure virtual]
int32_t get_cache_size (  ) 

get cache size

返回:
cache size

在文件Features.h145行定义。

virtual EFeatureClass get_feature_class (  )  [pure virtual]
virtual EFeatureType get_feature_type (  )  [pure virtual]
int32_t get_num_preproc (  ) 

get number of preprocessors

返回:
number of preprocessors

在文件Features.h136行定义。

int32_t get_num_preprocessed (  ) 

get whether specified preprocessor (or all if num=1) was/were already applied

get the number of applied preprocs

返回:
number of applied preprocessors

在文件Features.cpp99行定义。

virtual int32_t get_num_vectors (  )  [pure virtual]
CPreProc * get_preproc ( int32_t  num  ) 

get current preprocessor

get specified preprocessor

参数:
num index of preprocessor in list

在文件Features.cpp87行定义。

virtual int32_t get_size (  )  [pure virtual]
bool has_property ( EFeatureProperty  p  ) 

check if features have given property

参数:
p feature property
返回:
if features have given property

在文件Features.h202行定义。

bool is_preprocessed ( int32_t  num  ) 

get whether specified preprocessor was already applied

参数:
num index of preprocessor in list

在文件Features.h124行定义。

void list_feature_obj (  ) 

list feature object

在文件Features.cpp164行定义。

bool load ( char *  fname  )  [virtual]

load features from file

参数:
fname filename to load from
返回:
if loading was successful

CSimpleFeatures< ST >CStringFeatures< ST >CSimpleFeatures< float64_t >CSimpleFeatures< uint16_t >CStringFeatures< uint8_t >CStringFeatures< uint16_t >重载。

在文件Features.cpp249行定义。

virtual bool reshape ( int32_t  num_features,
int32_t  num_vectors 
) [virtual]

in case there is a feature matrix allow for reshaping

NOT IMPLEMENTED!

参数:
num_features new number of features
num_vectors new number of vectors
返回:
if reshaping was successful

CSimpleFeatures< ST >CSimpleFeatures< float64_t >CSimpleFeatures< uint16_t >重载。

在文件Features.h163行定义。

bool save ( char *  fname  )  [virtual]

save features to file

参数:
fname filename to save to
返回:
if saving was successful

CSimpleFeatures< ST >CStringFeatures< ST >CSimpleFeatures< float64_t >CSimpleFeatures< uint16_t >CStringFeatures< uint8_t >CStringFeatures< uint16_t >重载。

在文件Features.cpp254行定义。

void set_preprocessed ( int32_t  num  ) 

set applied flag for preprocessor

参数:
num index of preprocessor in list

在文件Features.h118行定义。

void set_property ( EFeatureProperty  p  ) 

set property

参数:
p kernel property to set

在文件Features.h208行定义。

void unset_property ( EFeatureProperty  p  ) 

unset property

参数:
p kernel property to unset

在文件Features.h217行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation