115 SG_INFO(
"opt_a: a=%1.3e deriv=%1.3e la=%1.3e ua=%1.3e\n", a, da, la ,ua)
124 SG_INFO(
"setting opt_a: %g\n", a)
140 SG_INFO(
"pos_feat=[%i,%i,%i,%i],neg_feat=[%i,%i,%i,%i]\n",
pos->
get_N(),
pos->
get_N(),
pos->
get_N()*
pos->
get_N(),
pos->
get_N()*
pos->
get_M(),
neg->
get_N(),
neg->
get_N(),
neg->
get_N()*
neg->
get_N(),
neg->
get_N()*
neg->
get_M())
149 int32_t num, int32_t &len,
float64_t* target)
165 return featurevector;
169 float64_t* featurevector, int32_t num, int32_t& len)
171 int32_t i,j,p=0,x=num;
231 SG_INFO(
"calculating FK feature matrix\n")
235 if (!(x % (num_vectors/10+1)))
236 SG_DEBUG(
"%02d%%.", (
int) (100.0*x/num_vectors))
237 else if (!(x % (num_vectors/200+1)))
251 void CFKFeatures::init()
float64_t set_opt_a(float64_t a=-1)
The class DenseFeatures implements dense feature matrices.
int32_t get_num_features() const
int32_t get_M() const
access function for number of observations M
virtual int32_t get_num_vectors() const
float64_t deriv_a(float64_t a, int32_t dimension=-1)
int32_t num_features
number of features in cache
CStringFeatures< uint16_t > * get_observations()
return observation pointer
float64_t model_probability(int32_t dimension=-1)
inline proxy for model probability.
void add(bool *param, const char *name, const char *description="")
virtual int32_t get_num_vectors() const
float64_t model_derivative_q(T_STATES i, int32_t dimension)
void set_num_vectors(int32_t num)
SGMatrix< float64_t > feature_matrix
float64_t model_derivative_a(T_STATES i, T_STATES j, int32_t dimension)
computes log dp(lambda)/d a_ij.
virtual float64_t * compute_feature_vector(int32_t num, int32_t &len, float64_t *target=NULL)
all of classes and functions are contained in the shogun namespace
float64_t model_derivative_p(T_STATES i, int32_t dimension)
virtual float64_t * set_feature_matrix()
int32_t num_vectors
number of vectors in cache
void free_feature_matrix()
void set_models(CHMM *p, CHMM *n)
static float64_t logarithmic_sum(float64_t p, float64_t q)
T_STATES get_N() const
access function for number of states N
The class FKFeatures implements Fischer kernel features obtained from two Hidden Markov models...
float64_t model_derivative_b(T_STATES i, uint16_t j, int32_t dimension)
computes log dp(lambda)/d b_ij.