Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

cktest bug? #1406

Closed
euhruska opened this issue Mar 26, 2019 · 3 comments · Fixed by #1418
Closed

cktest bug? #1406

euhruska opened this issue Mar 26, 2019 · 3 comments · Fixed by #1418
Labels

Comments

@euhruska
Copy link

I updated my conda environment and now getting an error with cktest something about a flag of the array


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-103-4e4c5426a49a> in <module>
----> 1 ck=msm_object.cktest(3, mlags=4)

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/estimators/_msm_estimator_base.py in cktest(self, nsets, memberships, mlags, conf, err_est, n_jobs, show_progress)
    846         ck = ChapmanKolmogorovValidator(self, self, memberships, mlags=mlags, conf=conf,
    847                                         n_jobs=n_jobs, err_est=err_est, show_progress=show_progress)
--> 848         ck.estimate(self._dtrajs_full)
    849         return ck

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/_base/estimator.py in estimate(self, X, **params)
    405         if params:
    406             self.set_params(**params)
--> 407         self._model = self._estimate(X)
    408         # ensure _estimate returned something
    409         assert self._model is not None

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/estimators/lagged_model_validators.py in _estimate(self, data)
    167             model = estimated_models[i]
    168             estimator = estimators[i]
--> 169             self._est.append(self._compute_observables(model, estimator))
    170             if self.has_errors and self.err_est:
    171                 l, r = self._compute_observables_conf(model, estimator)

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/estimators/lagged_model_validators.py in _compute_observables(self, model, estimator, mlag)
    465             p0sub = p0[subset]  # map distribution to new active set
    466             p0sub /= p0sub.sum()  # renormalize
--> 467             pksub = model.propagate(p0sub, mlag)
    468             for j in range(self.nsets):
    469                 pk_on_set[i, j] = np.dot(pksub, self.memberships[subset, j])  # map onto set

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/models/msm.py in propagate(self, p0, k)
    485                 pk = _np.dot(pk.T, self.transition_matrix)
    486         else:  # dense: employ eigenvalue decomposition
--> 487             self._ensure_eigendecomposition(self.nstates)
    488             from pyemma.util.linalg import mdot
    489             pk = mdot(p0.T,

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/models/msm.py in _ensure_eigendecomposition(self, neig)
    357                 # not enough eigenpairs present
    358                 # or eigendecomposition computed for an outdated transition matrix - recompute.
--> 359                 self._compute_eigendecomposition(neig)
    360         except AttributeError:
    361             # no eigendecomposition yet - compute:

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/msm/models/msm.py in _compute_eigendecomposition(self, neig)
    320         """ Conducts the eigenvalue decomposition and stores k eigenvalues, left and right eigenvectors """
    321         from msmtools.analysis import rdl_decomposition
--> 322         self._p_id = _hash_numpy_array(self.transition_matrix)
    323 
    324         if self.reversible:

/scratch1/eh22/conda/envs/py34/lib/python3.7/site-packages/pyemma/util/numeric.py in _hash_numpy_array(x)
     45         v = hashlib.sha1(x)
     46     finally:
---> 47         x.flags.writeable = old
     48     hash_value = hash((x.shape, x.strides, v.digest()))
     49 

ValueError: cannot set WRITEABLE flag to True of this array

pyemma 2.5.5 numpy 1.16.2, python 3.7.2
msm_object

MaximumLikelihoodMSM(connectivity='largest', count_mode='sliding',
           dt_traj='1 step', lag=110, maxerr=1e-08, maxiter=1000000,
           mincount_connectivity='1/n', reversible=True, score_k=10,
           score_method='VAMP2', sparse=False, statdist_constraint=None)
@marscher
Copy link
Member

can you confirm downgrading numpy to 1.15 solves the issue?

@euhruska
Copy link
Author

confirmed

@marscher
Copy link
Member

marscher commented Mar 27, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants