Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

update gbdt docs based on the issue #1720

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions docs/en_US/TrialExample/GbdtExample.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand Down