{0.2, 0.75, 0.05, 0 },
{0 , 0.05, 0.75, 0.2},
{0 , 0 , 0.2 , 0.8 }});
IDoubleArray ts1 = msm.timescales(T, 1);
IEigenvalueDecomposition evd = alg.evd(T);
IDoubleArray Lambda = evd.getDiagonalMatrix();
System.out.println("old timescales: "+ts1);
System.out.println("Lambda = \n"+Lambda+"\n");
int nhidden = 2;
PCCA pcca = msmNew.createPCCA(T, nhidden);
IDoubleArray R = evd.getRightEigenvectorMatrix().viewReal();
IDoubleArray Rsub = R.viewBlock(0, 0, T.rows(), nhidden);
pcca.setEigenvectors(Rsub);
pcca.perform();
IDoubleArray M = pcca.getFuzzy();
System.out.println("M\n"+M);
IDoubleArray pi = msm.stationaryDistribution(T);
IDoubleArray Pi = doublesNew.diag(pi);
IDoubleArray piC = alg.product(alg.transposeToNew(M),pi);
IDoubleArray PiC = doublesNew.diag(piC);
System.out.println("Pi = \n"+Pi+"\n");
System.out.println("PiC = \n"+PiC+"\n");
IDoubleArray Res = alg.transposeToNew(M);
IDoubleArray Int = alg.product(alg.product(Pi,M),alg.inverse(PiC));
System.out.println("R = \n"+Res+"\n");
System.out.println("I = \n"+Int+"\n");
IDoubleArray RItinv = alg.transposeToNew(alg.inverse(alg.product(Res,Int)));
IDoubleArray IntT = alg.transposeToNew(Int);
IDoubleArray ResT = alg.transposeToNew(Res);
IDoubleArray TC = alg.product(alg.product(alg.product(RItinv,IntT),T),ResT);
System.out.println("TC = \n"+TC+"\n");
IEigenvalueDecomposition evdC = alg.evd(TC);
IDoubleArray LambdaC = evdC.getDiagonalMatrix();
System.out.println("LambdaC = \n"+LambdaC+"\n");
System.exit(0);
/*
IDoubleArray pi = msm.stationaryDistribution(T);