LightGBM
Train LightGBM
Train a LightGBM model using your data, where X is the input (as a DataFrame or NumPy array) and y is the target. You can also set sample weights in advanced options.
lightgbmfitclassificationregression
Required packages
You need below packages to use the code generated by recipe. All packages are automatically installed in MLJAR Studio.
lightgbm>=4.5.0
Interactive recipe
You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.
In the below recipe, we assume that you have following variables available in your notebook:
- my_lightgbm (type LGBMClassifier)
- my_regressor (type LGBMRegressor)
- X (type DataFrame)
- y (type Series)
Python code
# Python code will be hereCode explanation
This code fits model on training data (X, y). The training time depends on data size (number or rows and columns) and algorithm complexity.
LightGBM cookbook
Code recipes from LightGBM cookbook.
- « Previous
- LightGBM Classifier
- Next »
- LightGBM Predict