From 7644d7c38c397ec1eafed19e32a13a5f853e9acd Mon Sep 17 00:00:00 2001 From: Xiaohui Xue Date: Fri, 8 Nov 2019 14:07:56 +0800 Subject: [PATCH] update gbdt docs --- docs/en_US/TrialExample/GbdtExample.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/en_US/TrialExample/GbdtExample.md b/docs/en_US/TrialExample/GbdtExample.md index 22a94f48bb..95ab71d06f 100644 --- a/docs/en_US/TrialExample/GbdtExample.md +++ b/docs/en_US/TrialExample/GbdtExample.md @@ -44,7 +44,15 @@ Given the features and label in train data, we train a GBDT regression model and ## 3. How to run in nni -### 3.1 Prepare your trial code + +### 3.1 Install all the requirments + +``` +pip install lightgbm +pip install pandas +``` + +### 3.2 Prepare your trial code You need to prepare a basic code as following: @@ -86,7 +94,7 @@ if __name__ == '__main__': run(lgb_train, lgb_eval, PARAMS, X_test, y_test) ``` -### 3.2 Prepare your search space. +### 3.3 Prepare your search space. If you like to tune `num_leaves`, `learning_rate`, `bagging_fraction` and `bagging_freq`, you could write a [search_space.json](https://github.com/Microsoft/nni/blob/master/examples/trials/auto-gbdt/search_space.json) as follow: ```json @@ -100,7 +108,7 @@ If you like to tune `num_leaves`, `learning_rate`, `bagging_fraction` and `baggi More support variable type you could reference [here](../Tutorial/SearchSpaceSpec.md). -### 3.3 Add SDK of nni into your code. +### 3.4 Add SDK of nni into your code. ```diff +import nni @@ -146,7 +154,7 @@ if __name__ == '__main__': run(lgb_train, lgb_eval, PARAMS, X_test, y_test) ``` -### 3.4 Write a config file and run it. +### 3.5 Write a config file and run it. In the config file, you could set some settings including: