53 SG_ERROR(
"Only features with equal number of vectors are currently "
66 SG_ADD(&m_num_features,
"num_features",
67 "Number of features from each of the distributions",
90 SG_DEBUG(
"Number of samples %d!\n", m);
96 result+=K(j, i)*L(i, j);
180 SG_DEBUG(
"sum_K: %f, sum_L: %f, trace_K: %f, trace_L: %f\n", sum_K, sum_L,
207 float64_t var_hsic=1.0/m/(m-1)*(sum-trace);
208 SG_DEBUG(
"1.0/m/(m-1)*(sum-trace): %f\n", var_hsic)
212 var_hsic=72.0*(m-4)*(m-5)/m/(m-1)/(m-2)/(m-3)*var_hsic;
213 SG_DEBUG(
"var_hsic: %f\n", var_hsic)
217 float64_t mu_x=1.0/m/(m-1)*(sum_K-trace_K);
218 float64_t mu_y=1.0/m/(m-1)*(sum_L-trace_L);
219 SG_DEBUG(
"mu_x: %f, mu_y: %f\n", mu_x, mu_y)
222 float64_t m_hsic=1.0/m*(1+mu_x*mu_y-mu_x-mu_y);
virtual bool init(CFeatures *lhs, CFeatures *rhs)
virtual float64_t compute_p_value(float64_t statistic)
The Custom Kernel allows for custom user provided kernel matrices.
SGMatrix< float64_t > get_kernel_matrix_L()
virtual SGVector< float64_t > sample_null()
virtual int32_t get_num_vectors() const =0
virtual void set_p(CFeatures *p)
static float64_t gamma_cdf(float64_t x, float64_t a, float64_t b)
virtual void set_p(CFeatures *p)
virtual float64_t compute_threshold(float64_t alpha)
virtual void set_q(CFeatures *q)
SGMatrix< float64_t > get_kernel_matrix_K()
virtual SGVector< float64_t > sample_null()
SGVector< float64_t > fit_null_gamma()
virtual float64_t compute_p_value(float64_t statistic)
static float64_t gamma_inverse_cdf(float64_t p, float64_t a, float64_t b)
virtual float64_t compute_threshold(float64_t alpha)
all of classes and functions are contained in the shogun namespace
The class Features is the base class of all feature objects.
ENullApproximationMethod m_null_approximation_method
Kernel independence test base class. Provides an interface for performing an independence test...
virtual float64_t compute_statistic()
static int32_t pow(bool x, int32_t n)
virtual void set_q(CFeatures *q)