本文整理汇总了Python中msmbuilder.msm.MarkovStateModel.eigtransform方法的典型用法代码示例。如果您正苦于以下问题:Python MarkovStateModel.eigtransform方法的具体用法?Python MarkovStateModel.eigtransform怎么用?Python MarkovStateModel.eigtransform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类msmbuilder.msm.MarkovStateModel
的用法示例。
在下文中一共展示了MarkovStateModel.eigtransform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_eigtransform_2
# 需要导入模块: from msmbuilder.msm import MarkovStateModel [as 别名]
# 或者: from msmbuilder.msm.MarkovStateModel import eigtransform [as 别名]
def test_eigtransform_2():
model = MarkovStateModel(n_timescales=2)
traj = [4, 3, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 0, 1, 1, 2, 2, 0, 0]
model.fit([traj])
transformed_0 = model.eigtransform([traj], mode='clip')
# clip off the first two states (not ergodic)
assert transformed_0[0].shape == (len(traj) - 2, model.n_timescales)
transformed_1 = model.eigtransform([traj], mode='fill')
assert transformed_1[0].shape == (len(traj), model.n_timescales)
assert np.all(np.isnan(transformed_1[0][:2, :]))
assert not np.any(np.isnan(transformed_1[0][2:]))
示例2: test_12
# 需要导入模块: from msmbuilder.msm import MarkovStateModel [as 别名]
# 或者: from msmbuilder.msm.MarkovStateModel import eigtransform [as 别名]
def test_12():
# test eigtransform
model = MarkovStateModel(n_timescales=1)
model.fit([[4, 3, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 0, 1, 1, 2, 2, 0, 0]])
assert model.mapping_ == {0: 0, 1: 1, 2: 2}
assert len(model.eigenvalues_) == 2
t = model.eigtransform([[0, 1]], right=True)
assert t[0][0] == model.right_eigenvectors_[0, 1]
assert t[0][1] == model.right_eigenvectors_[1, 1]
s = model.eigtransform([[0, 1]], right=False)
assert s[0][0] == model.left_eigenvectors_[0, 1]
assert s[0][1] == model.left_eigenvectors_[1, 1]