11 #ifndef _LINEARCLASSIFIER_H__
12 #define _LINEARCLASSIFIER_H__
123 virtual bool load(FILE* srcfile);
130 virtual bool save(FILE* dstfile);
173 virtual const char*
get_name()
const {
return "LinearMachine"; }
The class Labels models labels, i.e. class assignments of objects.
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)=0
virtual CDotFeatures * get_features()
void set_w(SGVector< float64_t > src_w)
Features that support dot products among other operations.
virtual void store_model_features()
A generic learning machine interface.
void get_w(float64_t *&dst_w, int32_t &dst_dims)
virtual bool save(FILE *dstfile)
virtual const char * get_name() const
virtual bool load(FILE *srcfile)
Class LinearMachine is a generic interface for all kinds of linear machines like classifiers.
SGVector< float64_t > get_w()
virtual ~CLinearMachine()
The class Features is the base class of all feature objects.
virtual void set_features(CDotFeatures *feat)
void set_bias(float64_t b)
virtual float64_t apply(int32_t vec_idx)
get output for example "vec_idx"
virtual CLabels * apply()