78 for (int32_t i=0; i<feature_matrix.
num_cols; i++)
84 return feature_matrix;
94 for (int32_t i=0; i<vector.
vlen; i++)
95 normed_vec[i]=vector.
vector[i]/norm;
112 void CPNorm::register_param ()
122 for (
int i = 0; i < vec_len; ++i)
123 norm += fabs (vec[i]);
static T twonorm(const T *x, int32_t len)
|| x ||_2
void set_pnorm(double pnorm)
virtual bool save(FILE *f)
save preprocessor init-data to file
virtual void cleanup()
cleanup
static T qnorm(T *x, int32_t len, float64_t q)
|| x ||_q
static void scale_vector(T alpha, T *vec, int32_t len)
Scale vector inplace.
virtual SGMatrix< float64_t > apply_to_feature_matrix(CFeatures *features)
void add(bool *param, const char *name, const char *description="")
Template class DensePreprocessor, base class for preprocessors (cf. CPreprocessor) that apply to CDen...
virtual EFeatureClass get_feature_class() const =0
virtual SGVector< float64_t > apply_to_feature_vector(SGVector< float64_t > vector)
virtual bool load(FILE *f)
initialize preprocessor from file
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
virtual EFeatureType get_feature_type() const =0