32 #ifndef VARIANCE_H0__H_ 33 #define VARIANCE_H0__H_ 43 template <
typename T>
class SGMatrix;
50 #ifndef DOXYGEN_SHOULD_SKIP_THIS 54 T operator()(
const SGMatrix<T>& kernel_matrix)
62 VectorXt diag=map.diagonal();
63 map.diagonal().setZero();
65 auto term_1=
CMath::sq(map.array().sum()/B/(B-1));
66 auto term_2=map.array().square().sum()/B/(B-1);
67 auto term_3=(map.colwise().sum()/(B-1)).array().square().sum()/B;
71 auto variance_estimate=2*(term_1+term_2-2*term_3);
72 return variance_estimate;
75 #endif // DOXYGEN_SHOULD_SKIP_THIS 82 #endif // VARIANCE_H0__H_
all of classes and functions are contained in the shogun namespace