跳转到主要内容

使用Scikit-Learn和Dask进行超参数搜索的工具

项目描述

Travis Status Documentation Status Conda Badge PyPI Badge

使用Scikit-LearnDask进行超参数搜索的工具。

亮点

  • Scikit-Learn的GridSearchCVRandomizedSearchCV的即插即用替代品。

  • 可以使用线程、进程或跨集群分布来并行执行超参数优化。

  • 与Dask集合配合良好。Dask数组、dataframes和delayed可以传递给fit

  • 具有相同参数和输入的候选估计器将只拟合一次。对于如Pipeline之类的复合估计器,这可以显著提高效率,因为它可以避免昂贵的重复计算。

有关更多信息,请参阅文档

安装

Dask-searchcv可通过condapip获得。

# Install with conda
$ conda install dask-searchcv -c conda-forge

# Install with pip
$ pip install dask-searchcv

示例

from sklearn.datasets import load_digits
from sklearn.svm import SVC
import dask_searchcv as dcv
import numpy as np

digits = load_digits()

param_space = {'C': np.logspace(-4, 4, 9),
               'gamma': np.logspace(-4, 4, 9),
               'class_weight': [None, 'balanced']}

model = SVC(kernel='rbf')
search = dcv.GridSearchCV(model, param_space, cv=3)

search.fit(digits.data, digits.target)

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

dask-searchcv-0.2.0.tar.gz (52.3 kB 查看哈希)

上传时间:

构建分布

dask_searchcv-0.2.0-py2.py3-none-any.whl (40.0 kB 查看哈希)

上传时间: Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面