|构建状态| |覆盖状态| |PyPi版本| [|许可证|] (https://apache.ac.cn/licenses/LICENSE-2.0) |DOI| [|文档|] (http://msmbuilder.org/osprey)
项目描述
[
] (https://apache.ac.cn/licenses/LICENSE-2.0)
[
] (http://msmbuilder.org/osprey)
标志
Osprey是一个易于使用的工具,用于在Python中使用scikit-learn(或使用与scikit-learn兼容的API)进行机器学习算法的超参数优化。
每个Osprey实验结合了一个数据集、一个估计器、一个搜索空间(和引擎)、交叉验证以及异步序列化,以实现模型超参数的分布式并行优化。
文档
有关完整文档,请访问Osprey主页。
安装
如果您有Anaconda Python发行版,安装就像这样简单
$ conda install -c omnia osprey
您还可以使用pip安装Osprey
$ pip install osprey
或者,您可以直接从这个GitHub仓库安装
$ git clone https://github.com/msmbuilder/osprey.git $ cd osprey && git checkout 1.1.0 $ python setup.py install
使用MSMBuilder的示例
下面是一个osprey config文件的示例,用于根据模型中使用的簇数量和二面角对马尔可夫状态模型进行交叉验证
estimator:
eval_scope: msmbuilder
eval: |
Pipeline([
('featurizer', DihedralFeaturizer(types=['phi', 'psi'])),
('cluster', MiniBatchKMeans()),
('msm', MarkovStateModel(n_timescales=5, verbose=False)),
])
search_space:
cluster__n_clusters:
min: 10
max: 100
type: int
featurizer__types:
choices:
- ['phi', 'psi']
- ['phi', 'psi', 'chi1']
type: enum
cv: 5
dataset_loader:
name: mdtraj
params:
trajectories: ~/local/msmbuilder/Tutorial/XTC/*/*.xtc
topology: ~/local/msmbuilder/Tutorial/native.pdb
stride: 1
trials:
uri: sqlite:///osprey-trials.db
然后运行osprey worker。您也可以在集群上同时运行多个osprey worker并行实例。
$ osprey worker config.yaml ... ---------------------------------------------------------------------- Beginning iteration 1 / 1 ---------------------------------------------------------------------- History contains: 0 trials Choosing next hyperparameters with random... {'cluster__n_clusters': 20, 'featurizer__types': ['phi', 'psi']} Fitting 5 folds for each of 1 candidates, totalling 5 fits [Parallel(n_jobs=1)]: Done 1 jobs | elapsed: 0.3s [Parallel(n_jobs=1)]: Done 5 out of 5 | elapsed: 1.8s finished --------------------------------- Success! Model score = 4.080646 (best score so far = 4.080646) --------------------------------- 1/1 models fit successfully. time: October 27, 2014 10:44 PM elapsed: 4 seconds. osprey worker exiting.
您可以使用osprey dump将数据库导出到JSON或CSV。
依赖关系
python>=2.7.11
six>=1.10.0
pyyaml>=3.11
numpy>=1.10.4
scipy>=0.17.0
scikit-learn>=0.17.0
sqlalchemy>=1.0.10
bokeh>=0.12.0
matplotlib>=1.5.0
pandas>=0.18.0
GPy(可选,用于gp策略)
hyperopt(可选,用于hyperopt_tpe策略)
nose(可选,用于测试)
贡献
如果您在此软件包中遇到任何问题,请考虑向GitHub Issue Tracker提交工单。我们也非常欢迎任何功能请求,并强烈鼓励用户提交拉取请求以修复错误和改进。
有关更多详细信息,请参阅我们的文档。
引用
如果您在研究中使用了Osprey,请引用
@misc{osprey,
author = {Robert T. McGibbon and
Carlos X. Hernández and
Matthew P. Harrigan and
Steven Kearnes and
Mohammad M. Sultan and
Stanislaw Jastrzebski and
Brooke E. Husic and
Vijay S. Pande},
title = {Osprey 1.0.0},
month = jun,
year = 2016,
doi = {10.5281/zenodo.56251},
url = {http://dx.doi.org/10.5281/zenodo.56251}
}