markovmodel / msmtools

Tools for estimating and analyzing Markov state models
GNU Lesser General Public License v3.0
40 stars 27 forks source link

Add rate matrix estimation #53

Closed franknoe closed 6 years ago

franknoe commented 9 years ago

I am just copying this issue from PyEMMA. Probably the text below is outdated though.

@fabian-paul , whenever you feel confident about the robustness of your rate matrix estimation, please commit a separate feature branch. We will include it in the 1.3 release (I will do the merge).

I suggest to do this as follows:

  1. Add a new method to pyemma.msm.estimation. I'm not sure exactly what the input is in your case, but I imagine something like

    def rate_matrix(dtrajs, tau, use_connectivity=True, reversible=True)
       """Estimates a rate matrix from discrete trajectories by likelihood maximization at lag time tau.
    
       Parameters
       -------------
       dtrajs : int-array or list of int-arrays
           discrete trajectories
       tau : int
           lag time at which the likelihood is evaluated
       use_connectivity : bool, optional, default=True
           If true, only the rates with c_ij(1)+c_ji(1) > 0 will be estimated. 
           If false, all rates with c_ij(tau)+c_ji(tau) can be nonzero
       reversible : bool, optional, default=True
           If true, the estimated rate matrix is the maximum likelihood reversible rate matrix.
       """

    This is a little different from the other estimation method in msm.estimation, which do an elementary step (trajectories -> count matrix; count matrix -> transition matrix). Perhaps the same can be done here, I am not sure.

  2. Add a new property rate_matrix() to the EstimatedMSM object which calls

    rate_matrix(self.active_dtrajs, self.lag, use_connectivity=True, reversible=self.is_reversible)
marscher commented 6 years ago

fixed by #57