18 using namespace shogun;
48 for (int32_t i=0; i<
m_d.
vlen; i++)
67 SG_ERROR(
"Specified features are not of type CDotFeatures\n")
131 for (int32_t i=0; i<
m_d.
vlen; i++)
132 answer+=temp_holder[i]*temp_holder[i]/
m_d.
vector[i];
134 SG_FREE(temp_holder);
139 answer+=difference[i]*difference[i]/
m_d.
vector[i];
144 answer+=difference[i]*difference[i]/
m_d.
vector[0];
187 SG_ERROR(
"Unitary matrix not set\n")
192 for(int32_t i=0; i<
m_d.
vlen; i++)
195 cblas_dgemm(CblasRowMajor, CblasTrans, CblasNoTrans,
198 cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
202 SG_FREE(diag_holder);
203 SG_FREE(temp_holder);
207 for (int32_t i=0; i<
m_d.
vlen; i++)
218 void CGaussian::register_params()
243 for (int32_t i=0; i<cov.
num_rows; i++)
286 cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans,
290 r_matrix=temp_matrix;
296 1, r_matrix,
m_mean.
vlen, random_vec, 1, 0, samp, 1);
322 #endif // HAVE_LAPACK
SGVector< float64_t > sample()
virtual void set_features(CFeatures *f)
Gaussian distribution interface.
virtual bool train(CFeatures *data=NULL)
static float64_t randn_double()
#define SG_NOTIMPLEMENTED
virtual float64_t compute_log_PDF(SGVector< float64_t > point)
Base class Distribution from which all methods implementing a distribution are derived.
Features that support dot products among other operations.
virtual SGVector< float64_t > get_mean()
void add(bool *param, const char *name, const char *description="")
SGMatrix< float64_t > m_u
virtual SGVector< float64_t > get_mean()
static SGVector< float64_t > compute_eigenvectors(SGMatrix< float64_t > matrix)
virtual float64_t get_log_model_parameter(int32_t num_param)
static CGaussian * obtain_from_generic(CDistribution *distribution)
virtual void set_cov(SGMatrix< float64_t > cov)
SGVector< float64_t > m_mean
virtual SGMatrix< float64_t > get_cov()
#define M_PI
workaround for log2 being a define on cygwin
virtual float64_t get_log_likelihood_example(int32_t num_example)
The class Features is the base class of all feature objects.
static float64_t log(float64_t v)
virtual void set_mean(const SGVector< float64_t > mean)
static float32_t sqrt(float32_t x)
x^0.5
bool has_property(EFeatureProperty p) const
virtual int32_t get_num_model_parameters()
virtual SGMatrix< float64_t > get_cov()
virtual float64_t get_log_derivative(int32_t num_param, int32_t num_example)
void set_d(const SGVector< float64_t > d)
SGVector< float64_t > m_d