Package stallone.mc.pcca

Examples of stallone.mc.pcca.PCCA


        return( deltaG );
    }

    public PCCA createPCCA(IDoubleArray M, int nstates)
    {
        PCCA pcca = new PCCA();

        IDoubleArray evec = M;

        if (MarkovModel.util.isTransitionMatrix(M))
        {
            IEigenvalueDecomposition evd = Algebra.util.evd(M,nstates);
            evec = evd.getRightEigenvectorMatrix();
            evec = evec.viewBlock(0,0,M.rows(),nstates);
        }
        else
        {
            if (evec.columns() < nstates)
                throw(new IllegalArgumentException("Attempting to create PCCA decomposition into "+nstates+" states."+
                                                    "but only "+evec.columns()+" eigenvectors were provided"));
        }

        pcca.setEigenvectors(evec);
        pcca.perform();

        return(pcca);
    }
View Full Code Here


     * @param nstates
     * @return
     */
    public IIntArray metastableStates(IDoubleArray M, int nstates)
    {
        PCCA pcca = MarkovModel.create.createPCCA(M, nstates);
        return(pcca.getClusters());
    }
View Full Code Here

     * @param nstates
     * @return
     */
    public IDoubleArray metastableMemberships(IDoubleArray M, int nstates)
    {
        PCCA pcca = MarkovModel.create.createPCCA(M, nstates);
        return(pcca.getFuzzy());
    }
View Full Code Here

        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);
View Full Code Here

TOP

Related Classes of stallone.mc.pcca.PCCA

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.