@@ -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: