GithubHelp home page GithubHelp logo

hyperopt-doc-zh's Introduction

简介

Github开源项目hyperopt系列的中文文档,以及学习教程等

目录结构如下:

  • master
    • hyperopt文档
      • doc/en 英文版文档
      • doc/cn 中文版文档
    • tutorials 教程目录
      • data 教程需要的数据
      • zh 中文教程
      • en 英文教程

你也可以在本人的CSDN博客——Hyperopt中文文档导读查看相应文档与其他内容

更新日志


12/19/2018 添加了Hyperopt入门指南


12/18/2018 更新了Hyperopt在Lightgbm上的使用,并添加了xgboost与lightgbm快速上手教程


12/15/2018 更新教程两章-Hyperopt在Xgboost上的使用,添加数据文件,修改目录结构


在2017年的圣诞节前,翻译了有关HyperOpt的中文文档,这也算是填补了一个空白,以此作为献给所有**程序员,以及所有其他机器学习相关行业人员的圣诞礼物。圣诞快乐,各位。

本项目内容包括hyperopt系列开源项目的学习教程,代码的中文注释,wiki中文文档等内容. 2017年17月27日更新,相较于原hyperopt新增目录如下

  • 目录
    • hyperopt文档
      • doc_en 英文版文档
      • doc_cn 中文版文档
      • examples 例子

(下面是原Hyperopt的原文)

hyperopt: Distributed Asynchronous Hyper-parameter Optimization

Hyperopt is a Python library for serial and parallel optimization over awkward search spaces, which may include real-valued, discrete, and conditional dimensions.

Official project git repository: http://github.com/hyperopt/hyperopt

Documentation: http://hyperopt.github.io/hyperopt

Announcements mailing list: https://groups.google.com/forum/#!forum/hyperopt-announce

Discussion mailing list: https://groups.google.com/forum/#!forum/hyperopt-discuss

Thanks

This project has received support from

  • National Science Foundation (IIS-0963668),
  • Banting Postdoctoral Fellowship program,
  • National Science and Engineering Research Council of Canada (NSERC),
  • D-Wave Systems, Inc.

hyperopt-doc-zh's People

Contributors

albertz avatar araujoalexandre avatar birbbit avatar bjkomer avatar bwaldvogel avatar craigkelly avatar davidsmf avatar dwf avatar fonttian avatar gwtaylor avatar jaberg avatar jnothman avatar johnflux avatar lishen avatar lucasb-eyer avatar maxpumperla avatar npinto avatar sloth2012 avatar temporaer avatar twiecki avatar willgroves avatar wskish avatar yamins81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperopt-doc-zh's Issues

遇到问题,希望能得到您的帮助

我使用hyperopt中的fmin进行随机森林超参数选择,在选择过程中我输出了产生最优解的max_depth和n_estimators,但我输出的值均比使用fmin返回的值大1

这是我关于hyperopt

from functools import partial


def hyperopt_clt(params, data_x, data_y):
    global best
    model_clt = RandomForestClassifier(**params)
    acc = cross_val_score(model_clt, data_x, data_y).mean()
    if acc > best:
        best = acc
        print('new best:', best, params)
    return {'loss': 1 - acc, 'status': STATUS_OK}


space_clf = {
    'max_depth': hp.choice('max_depth', range(1, 51)),
    'n_estimators': hp.choice('n_estimators', range(1, 21))
}

best = 0
trials_clt = Trials()
hyperopt_clt_partial = partial(hyperopt_clt, data_x = data_x, data_y = data_y)
best_clt = fmin(hyperopt_clt_partial, space = space_clf, algo = tpe.suggest, max_evals = 100, trials = trials_clt)
print(best, '----------------')
print(best_clt, '------------')`

这是我得到的结果

new best:
0.7955077744291005
{'max_depth': 47, 'n_estimators': 12}
new best:
0.8071266849594411
{'max_depth': 5, 'n_estimators': 20}
100%|██████████| 100/100 [00:30<00:00,  3.29trial/s, best loss: 0.19287331504055893]
0.8071266849594411 ----------------
{'max_depth': 4, 'n_estimators': 19} ------------

关于hyperopt中fmin的一个错误问题

您好,首先感谢您翻译hyperopt的工作,这对于国内的用户是一个十分有帮助的工作,可是在我使用hyperopt的过程中遇到一个问题,搜索了很多资料人就无法解决,希望作者可以给与帮助,谢谢,问题如下:
我按照fmin文档的代码在我的python环境中执行了以后,出现了一个错误提示,代码和错误如下
`from hyperopt import fmin, tpe, hp

space = hp.uniform('x', -10, 10)
best = fmin(fn=lambda x : x**2,
space=space,
algo=tpe.suggest,
max_evals=100)

print(dir(best))`

File "D:\Anaconda3\lib\site-packages\hyperopt\fmin.py", line 314, in fmin
pass_expr_memo_ctrl=pass_expr_memo_ctrl)
File "D:\Anaconda3\lib\site-packages\hyperopt\base.py", line 786, in init
pyll.toposort(self.expr)
File "D:\Anaconda3\lib\site-packages\hyperopt\pyll\base.py", line 715, in toposort
assert order[-1] == expr
TypeError: 'generator' object is not subscriptable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.