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.h第53行定义。
公有成员 | |
CFeatures (int32_t size=0) | |
CFeatures (const CFeatures &orig) | |
CFeatures (CFile *loader) | |
virtual CFeatures * | duplicate () 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 CPreProc * | del_preproc (int32_t num) |
del current preprocessor | |
CPreProc * | get_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 void | load (CFile *loader) |
virtual void | save (CFile *writer) |
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 ) |
copy constructor
在文件Features.cpp第35行定义。
~CFeatures | ( | ) | [virtual] |
在文件Features.cpp第51行定义。
int32_t add_preproc | ( | CPreProc * | p ) | [virtual] |
bool check_feature_compatibility | ( | CFeatures * | f ) |
check feature compatibility
f | features to check for compatibility |
在文件Features.cpp第250行定义。
void clean_preprocs | ( | ) |
clears all preprocs
在文件Features.cpp第114行定义。
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.cpp第120行定义。
virtual CFeatures* duplicate | ( | ) | const [pure virtual] |
duplicate feature object
abstract base method
在CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CPolyFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CWDFeatures、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >内被实现。
int32_t get_cache_size | ( | ) |
virtual EFeatureClass get_feature_class | ( | ) | [pure virtual] |
get feature class
abstract base method
在CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CPolyFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CWDFeatures、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >内被实现。
virtual EFeatureType get_feature_type | ( | ) | [pure virtual] |
get feature type
abstract base method
在CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CPolyFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CWDFeatures、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >内被实现。
int32_t get_num_preproc | ( | ) |
int32_t get_num_preprocessed | ( | ) |
get whether specified preprocessor (or all if num=1) was/were already applied
get the number of applied preprocs
在文件Features.cpp第100行定义。
virtual int32_t get_num_vectors | ( | ) | [pure virtual] |
get number of examples/vectors
abstract base method
在CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CPolyFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CWDFeatures、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >内被实现。
CPreProc * get_preproc | ( | int32_t | num ) |
get current preprocessor
get specified preprocessor
num | index of preprocessor in list |
在文件Features.cpp第88行定义。
virtual int32_t get_size | ( | ) | [pure virtual] |
get memory footprint of one feature
abstract base method
在CCombinedDotFeatures、CCombinedFeatures、CDummyFeatures、CExplicitSpecFeatures、CHashedWDFeatures、CHashedWDFeaturesTransposed、CImplicitWeightedSpecFeatures、CPolyFeatures、CSimpleFeatures< ST >、CSNPFeatures、CSparseFeatures< ST >、CSparsePolyFeatures、CStringFeatures< ST >、CWDFeatures、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >内被实现。
bool has_property | ( | EFeatureProperty | p ) |
check if features have given property
p | feature property |
在文件Features.h第209行定义。
bool is_preprocessed | ( | int32_t | num ) |
get whether specified preprocessor was already applied
num | index of preprocessor in list |
在文件Features.h第127行定义。
void list_feature_obj | ( | ) |
list feature object
在文件Features.cpp第165行定义。
virtual void load | ( | CFile * | loader ) | [virtual] |
load features from file
loader | File object via which data shall be loaded |
被CSimpleFeatures< ST >、CSparseFeatures< ST >、CStringFeatures< ST >、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >重载。
在文件Features.h第183行定义。
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 |
被CSimpleFeatures< ST >、CSimpleFeatures< float64_t >及CSimpleFeatures< uint16_t >重载。
在文件Features.h第166行定义。
virtual void save | ( | CFile * | writer ) | [virtual] |
save features to file
writer | File object via which data shall be saved |
被CSimpleFeatures< ST >、CSparseFeatures< ST >、CStringFeatures< ST >、CSimpleFeatures< float64_t >、CSimpleFeatures< uint16_t >、CSparseFeatures< float64_t >、CStringFeatures< uint8_t >、CStringFeatures< char >及CStringFeatures< uint16_t >重载。
在文件Features.h第192行定义。
void set_preprocessed | ( | int32_t | num ) |
void set_property | ( | EFeatureProperty | p ) |
void unset_property | ( | EFeatureProperty | p ) |