Questions tagged [lightgbm]

LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with the following advantages: ... Support of parallel and GPU learning. Capable of handling large-scale data.

LightGBM is a high performance gradient boosting (GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks. It is under the umbrella of the DMTK(http://github.com/microsoft/dmtk) project of Microsoft.

Resources:

676 questions
4
votes
2 answers

customized metric function for multi class in lightgbm

In my data, there are about 70 classes and I am using lightGBM to predict the correct class label. In R, would like to have a customised "metric" function where I can evaluate whether top 3 predictions by lightgbm cover the true label. The link here…
Areza
  • 5,623
  • 7
  • 48
  • 79
4
votes
1 answer

LightGBM- Classification metrics can't handle a mix of binary and continuous targets

I am facing a trouble when I use lightgbm to conduct grid search. lgb_classifer = lgb.LGBMRegressor(random_state=12) grid_lgb = { 'learning_rate': [0.01,0.05], 'num_iterations': [5,10,20]} gbm_lgb = GridSearchCV(estimator…
Rya
  • 329
  • 2
  • 15
4
votes
1 answer

python LightGBM text classicication with Tfidf

I'm trying to introduce LightGBM for text multiclassification. 2 columns in pandas dataframe, where 'category' and 'contents' are set as follows. Dataframe: contents category 1 this is example1... A 2 this is…
SY9
  • 165
  • 2
  • 11
4
votes
1 answer

Difference between evaluation metrics and evaluation function in lightgbm

Refer to lightgbm.cv, there are two parameters confusing me: metrics and feval. Based on my little knowledge on gbdt, evaluation metrics and evaluation function are both to compute the loss, such as auc, from a vector of predictions and a vector of…
Garvey
  • 1,197
  • 3
  • 13
  • 26
4
votes
1 answer

Accessing LightGBM model parameters

Sometimes I save a LightGBM model and later, upon reloading it, want to access some details about how the model was built. Is there a way to recover the fact that objective = "regression", for example? For convenience, here is brief code to play…
zkurtz
  • 3,230
  • 7
  • 28
  • 64
4
votes
3 answers

Unable to import lightgbm after install

My operating system is macOS Sierra, 10.12.5, and I am using Anaconda and python 2.7. After install, and when I try: import lightgbm as lgb I got the following message: OSError Traceback (most recent call…
Mike Gao
  • 71
  • 1
  • 1
  • 6
3
votes
1 answer

Is LightGBM available for Mac M1?

My goal is to learn a notebook. It has recall 97% while I am struggling with F1 Score 'Attrited Customer' 77.9%. The problem is the notebook uses LightGBM. I am unable to install LightGBM. What I've tried: pip install lightgbm -> it throws error…
Jason Rich Darmawan
  • 1,607
  • 3
  • 14
  • 31
3
votes
1 answer

Custom eval metric using early stopping in LGBM (Sklearn API) and Optuna

Questions: First question is probably extremely stupid but I will ask anyway: Is the pruning and the early stopping the same in this example below? Or is it two separate separate options controlling two separate processes? I got an imbalanced…
Kjetil Haukås
  • 374
  • 1
  • 11
3
votes
1 answer

Cant install LightGBM on Macbook Pro M1 2020, It doesnt seem to recognize Cmake

MacBook Pro (13-inch, M1, 2020) macOS Monterey 12.6 When I try to install LightGBM (via pip) I get the error: Exception: Please install CMake and all required dependencies first I already tried installing it via brew as well and it didnt work I went…
yeyowi6360
  • 41
  • 4
3
votes
1 answer

LightGBM: train() vs update() vs refit()

I'm implementing LightGBM (Python) into a continuous learning pipeline. My goal is to train an initial model and update the model (e.g. every day) with newly available data. Most examples load an already trained model and apply train() once…
OliverHennhoefer
  • 677
  • 2
  • 8
  • 21
3
votes
2 answers

How to save Tidymodels Lightgbm model for reuse

I have the following codes for creating a tidymodels workflow with lightgbm model. However, there is some problem when I tried to save into a .rds object and…
3
votes
1 answer

How to use "is_unbalance" and "scale_pos_weight" parameters in LightGBM for a binary classification project that is unbalanced (80:20)

I am currently having an imbalanced dataset as shown diagram below: Then, I use the 'is_unbalance' parameter by setting it to True when training the LightGBM model. Diagrams below show how I use this parameter. Example of using native API: Example…
3
votes
0 answers

LightGBM python package - version `GLIBCXX_3.4.18' not found

I'm trying to install and use lightgbm package in python, but it seems like there is a version conflict related to gcc. After installing the package, using pip install lightgbm, when trying to import it, the following error appear: >>>import…
CleverDev
  • 487
  • 6
  • 14
3
votes
1 answer

What is the difference between dataset, booster, cvbooster, sequence in lightgbm?

I am a little confused about these data structure API in lightgbm. My understanding is like: lgb.dataset is common usage to load data from pandas etc. lgb.booster is to load a model you trained before? (not sure) lgb.cvbooster is same as…
Nayr Nauy
  • 33
  • 3
3
votes
2 answers

LightGBM - Estimator not fitted error after joblib.load()

I fitted a LGBMRegressor() model and even predicted some values. I decided to save it (after fit of course) to use later, but when I try to load the model I'm getting this exception: Estimator not fitted, call fit before exploiting the model. I…
KabaL
  • 33
  • 5