products:ict:python:machine_learning:light_gbm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
products:ict:python:machine_learning:light_gbm [2023/10/12 17:29] – wikiadmin | products:ict:python:machine_learning:light_gbm [2023/10/12 17:30] (current) – wikiadmin | ||
---|---|---|---|
Line 26: | Line 26: | ||
4. **Creating a Dataset**: | 4. **Creating a Dataset**: | ||
- | To efficiently use LightGBM, you need to create a `Dataset` object from your data. This object is optimized for training and prediction. | + | To efficiently use LightGBM, you need to create a `Dataset` object from your data. This object is optimized for training and prediction. |
- | train_data = lgb.Dataset(data=X_train, | + | train_data = lgb.Dataset(data=X_train, |
- | | + | test_data = lgb.Dataset(data=X_test, |
5. **Setting Parameters**: | 5. **Setting Parameters**: | ||
- | LightGBM has a wide range of parameters that control the training process and the model' | + | LightGBM has a wide range of parameters that control the training process and the model' |
- | - `objective`: | + | - `objective`: |
- | - `num_leaves`: | + | |
- | - `learning_rate`: | + | |
- | - `max_depth`: | + | |
- | - `num_boost_round`: | + | |
- | - `metric`: Evaluation metric for model performance. | + | |
- | You can set these parameters in a dictionary and pass it to the training process. | + | - `num_leaves`: |
+ | |||
+ | - `learning_rate`: | ||
+ | |||
+ | - `max_depth`: | ||
+ | |||
+ | - `num_boost_round`: | ||
+ | |||
+ | - `metric`: Evaluation metric for model performance. | ||
+ | |||
+ | You can set these parameters in a dictionary and pass it to the training process. | ||
6. **Training the Model**: | 6. **Training the Model**: | ||
Line 55: | Line 60: | ||
- | The `early_stopping_rounds` parameter allows the training to stop early if the evaluation metric doesn' | + | The `early_stopping_rounds` parameter allows the training to stop early if the evaluation metric doesn' |
7. **Making Predictions**: | 7. **Making Predictions**: |
products/ict/python/machine_learning/light_gbm.1697113767.txt.gz · Last modified: 2023/10/12 17:29 by wikiadmin