20 using namespace Eigen;
32 m_tau[0]=0; m_tau[1]=1; m_tau[2]=2; m_tau[3]=3;
73 EigenSolver<MatrixXd> eig;
75 MatrixXd SPH = (eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix().cwiseSqrt() * eig.pseudoEigenvectors ().transpose()).inverse();
85 for(
int t = 0; t < N; t++)
88 EM = cor(spx,m_tau[t]);
98 C = SPH.inverse() * EQ.transpose();
101 for(
int t = 0; t < C.cols(); t++)
103 C.col(t) /= C.col(t).maxCoeff();
123 VectorXd
mean = x.rowwise().sum();
125 x = x.colwise() -
mean;
134 K = (L * R.transpose()) / (n-tau);
137 K = (K + K.transpose()) / 2.0;
T * get_matrix(index_t matIdx) const
void set_tau(SGVector< float64_t > tau)
static SGMatrix< float64_t > diagonalize(SGNDArray< float64_t > C, SGMatrix< float64_t > V0=SGMatrix< float64_t >(NULL, 0, 0, false), double eps=CMath::MACHINE_EPSILON, int itermax=200)
std::enable_if<!std::is_same< T, complex128_t >::value, float64_t >::type mean(const Container< T > &a)
SGVector< float64_t > get_tau() const
virtual CFeatures * apply(CFeatures *features)
static void inverse(SGMatrix< float64_t > matrix)
inverses square matrix in-place
all of classes and functions are contained in the shogun namespace
class ICAConverter Base class for ICA algorithms
The class Features is the base class of all feature objects.
SGMatrix< float64_t > m_mixing_matrix
SGNDArray< float64_t > get_covs() const