17 using namespace shogun;
65 for (int32_t i=0; i<feature_matrix.
num_cols; i++)
71 return feature_matrix;
81 for (int32_t i=0; i<vector.
vlen; i++)
82 normed_vec[i]=vector.
vector[i]/norm;
virtual SGMatrix< float64_t > apply_to_feature_matrix(CFeatures *features)
virtual bool load(FILE *f)
initialize preprocessor from file
virtual EFeatureType get_feature_type()=0
virtual bool save(FILE *f)
save preprocessor init-data to file
virtual SGVector< float64_t > apply_to_feature_vector(SGVector< float64_t > vector)
virtual EFeatureClass get_feature_class()=0
virtual void cleanup()
cleanup
static float64_t dot(const bool *v1, const bool *v2, int32_t n)
compute dot product between v1 and v2 (blas optimized)
The class Features is the base class of all feature objects.
static void scale_vector(T alpha, T *vec, int32_t len)
scale vector inplace
static float32_t sqrt(float32_t x)
x^0.5
Template class SimplePreprocessor, base class for preprocessors (cf. CPreprocessor) that apply to CSi...
#define SG_MALLOC(type, len)