当前位置: 首页>>代码示例>>Python>>正文


Python ContinuousTimeMSM.score方法代码示例

本文整理汇总了Python中msmbuilder.msm.ContinuousTimeMSM.score方法的典型用法代码示例。如果您正苦于以下问题:Python ContinuousTimeMSM.score方法的具体用法?Python ContinuousTimeMSM.score怎么用?Python ContinuousTimeMSM.score使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在msmbuilder.msm.ContinuousTimeMSM的用法示例。


在下文中一共展示了ContinuousTimeMSM.score方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_score_2

# 需要导入模块: from msmbuilder.msm import ContinuousTimeMSM [as 别名]
# 或者: from msmbuilder.msm.ContinuousTimeMSM import score [as 别名]
def test_score_2():
    ds = MullerPotential(random_state=0).get_cached().trajectories
    cluster = NDGrid(n_bins_per_feature=6,
                     min=[PARAMS['MIN_X'], PARAMS['MIN_Y']],
                     max=[PARAMS['MAX_X'], PARAMS['MAX_Y']])
    assignments = cluster.fit_transform(ds)
    test_indices = [5, 0, 4, 1, 2]
    train_indices = [3, 6, 7, 8, 9]

    model = ContinuousTimeMSM(lag_time=3, n_timescales=1)
    model.fit([assignments[i] for i in train_indices])
    test = model.score([assignments[i] for i in test_indices])
    train = model.score_
    print('train', train, 'test', test)
    assert 1 <= test < 2
    assert 1 <= train < 2
开发者ID:Eigenstate,项目名称:msmbuilder,代码行数:18,代码来源:test_ratematrix.py

示例2: test_score_2

# 需要导入模块: from msmbuilder.msm import ContinuousTimeMSM [as 别名]
# 或者: from msmbuilder.msm.ContinuousTimeMSM import score [as 别名]
def test_score_2():
    from msmbuilder.example_datasets.muller import MULLER_PARAMETERS as PARAMS
    ds = MullerPotential(random_state=0).get()['trajectories']
    cluster = NDGrid(n_bins_per_feature=6,
          min=[PARAMS['MIN_X'], PARAMS['MIN_Y']],
          max=[PARAMS['MAX_X'], PARAMS['MAX_Y']])
    assignments = cluster.fit_transform(ds)
    test_indices = [5, 0, 4, 1, 2]
    train_indices = [3, 6, 7, 8, 9]

    model = ContinuousTimeMSM(lag_time=3, n_timescales=1)
    model.fit([assignments[i] for i in train_indices])
    test = model.score([assignments[i] for i in test_indices])
    train = model.score_
    print('train', train, 'test', test)
    assert 1 <= test < 2
    assert 1 <= train < 2
开发者ID:kyleabeauchamp,项目名称:msmbuilder,代码行数:19,代码来源:test_ratematrix.py

示例3: test_score_3

# 需要导入模块: from msmbuilder.msm import ContinuousTimeMSM [as 别名]
# 或者: from msmbuilder.msm.ContinuousTimeMSM import score [as 别名]
def test_score_3():
    ds = MullerPotential(random_state=0).get_cached().trajectories
    cluster = NDGrid(n_bins_per_feature=6,
                     min=[PARAMS['MIN_X'], PARAMS['MIN_Y']],
                     max=[PARAMS['MAX_X'], PARAMS['MAX_Y']])

    assignments = cluster.fit_transform(ds)

    train_indices = [9, 4, 3, 6, 2]
    test_indices = [8, 0, 5, 7, 1]

    model = ContinuousTimeMSM(lag_time=3, n_timescales=1, sliding_window=False,
                              ergodic_cutoff=1)
    train_data = [assignments[i] for i in train_indices]
    test_data = [assignments[i] for i in test_indices]

    model.fit(train_data)
    train = model.score_
    test = model.score(test_data)
    print(train, test)
开发者ID:Eigenstate,项目名称:msmbuilder,代码行数:22,代码来源:test_ratematrix.py

示例4: test_score_3

# 需要导入模块: from msmbuilder.msm import ContinuousTimeMSM [as 别名]
# 或者: from msmbuilder.msm.ContinuousTimeMSM import score [as 别名]
def test_score_3():
    from msmbuilder.example_datasets.muller import MULLER_PARAMETERS as PARAMS

    cluster = NDGrid(n_bins_per_feature=6,
          min=[PARAMS['MIN_X'], PARAMS['MIN_Y']],
          max=[PARAMS['MAX_X'], PARAMS['MAX_Y']])

    ds = MullerPotential(random_state=0).get()['trajectories']
    assignments = cluster.fit_transform(ds)

    train_indices = [9, 4, 3, 6, 2]
    test_indices = [8, 0, 5, 7, 1]

    model = ContinuousTimeMSM(lag_time=3, n_timescales=1, sliding_window=False, ergodic_cutoff=1)
    train_data = [assignments[i] for i in train_indices]
    test_data = [assignments[i] for i in test_indices]

    model.fit(train_data)
    train = model.score_
    test = model.score(test_data)
    print(train, test)
开发者ID:rmcgibbo,项目名称:msmbuilder,代码行数:23,代码来源:test_ratematrix.py

示例5: test_score_1

# 需要导入模块: from msmbuilder.msm import ContinuousTimeMSM [as 别名]
# 或者: from msmbuilder.msm.ContinuousTimeMSM import score [as 别名]
def test_score_1():
    grid = NDGrid(n_bins_per_feature=5, min=-np.pi, max=np.pi)
    seqs = grid.fit_transform(load_doublewell(random_state=0)['trajectories'])
    model = ContinuousTimeMSM(verbose=False, lag_time=10, n_timescales=3).fit(seqs)
    np.testing.assert_approx_equal(model.score(seqs), model.score_)
开发者ID:synapticarbors,项目名称:msmbuilder-1,代码行数:7,代码来源:test_ratematrix.py


注:本文中的msmbuilder.msm.ContinuousTimeMSM.score方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。