34 using namespace shogun;
44 m_components=components;
62 REQUIRE(num_param==1,
"number of parameters in mixture model is 1"
63 " (i.e. number of components). num_components should be 1. %d supplied\n",num_param)
98 if (m_components!=NULL)
101 m_components=components;
129 void CMixtureModel::init()
SGVector< float64_t > cluster(SGVector< float64_t > point)
static CDistribution * obtain_from_generic(CSGObject *object)
int32_t get_num_elements() const
bool train(CFeatures *data=NULL)
Base class Distribution from which all methods implementing a distribution are derived.
virtual float64_t get_log_derivative(int32_t num_param, int32_t num_example)
virtual float64_t get_log_likelihood_example(int32_t num_example)
Class SGObject is the base class of all shogun objects.
index_t get_num_components() const
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
CDistribution * get_component(index_t index) const
SGVector< float64_t > sample()
The class Features is the base class of all feature objects.
CDynamicObjectArray * get_components() const
static float64_t log(float64_t v)
float64_t get_log_model_parameter(int32_t num_param=1)
CSGObject * get_element(int32_t index) const
void set_components(CDynamicObjectArray *components)
SGVector< float64_t > get_weights() const
void set_weights(SGVector< float64_t > weights)