27 using namespace shogun;
48 "matrix used to transform data");
50 "bias vector used to transform data");
91 for (int32_t i=0; i<n; i++)
94 for (int32_t j=0; j<n; j++)
108 CblasTrans, bias_tmp, 0.0, m_bias_vector.vector);
113 for (int32_t i=0; i<n; i++)
115 for (int32_t j=0; j<n; j++)
142 for (i=0; i<num_vectors; i++)
198 for (i=0; i<num_vectors; i++)
virtual bool init(CFeatures *lhs, CFeatures *rhs)
the class DimensionReductionPreprocessor, a base class for preprocessors used to lower the dimensiona...
SGVector< float64_t > m_bias_vector
virtual SGVector< float64_t > apply_to_feature_vector(SGVector< float64_t > vector)
virtual SGMatrix< float64_t > apply_to_feature_matrix(CFeatures *features)
static void dgemv(double alpha, const double *A, int rows, int cols, const CBLAS_TRANSPOSE transposeA, const double *X, double beta, double *Y)
virtual int32_t get_num_vectors() const
virtual void destroy_matrix()
static void add_scalar(T alpha, T *vec, int32_t len)
add scalar to vector inplace
virtual int32_t get_num_vectors() const =0
float64_t kernel(int32_t idx_a, int32_t idx_b)
static T * get_row_sum(T *matrix, int32_t m, int32_t n)
virtual void cleanup()
cleanup
void set_feature_matrix(SGMatrix< ST > matrix)
void add(bool *param, const char *name, const char *description="")
static T * get_column_sum(T *matrix, int32_t m, int32_t n)
virtual void destroy_vector()
SGMatrix< float64_t > get_kernel_matrix()
virtual CSimpleFeatures< float64_t > * apply_to_string_features(CFeatures *features)
CFeatures * m_init_features
SGMatrix< float64_t > m_transformation_matrix
static T max(T a, T b)
return the maximum of two integers
static void center_matrix(T *matrix, int32_t m, int32_t n)
static double * compute_eigenvectors(double *matrix, int n, int m)
static T sum(T *vec, int32_t len)
return sum(vec)
The class Features is the base class of all feature objects.
static void fill_vector(T *vec, int32_t len, T value)
static void scale_vector(T alpha, T *vec, int32_t len)
scale vector inplace
static float32_t sqrt(float32_t x)
x^0.5
void set_kernel(CKernel *kernel)
#define SG_MALLOC(type, len)