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
3
votes
0 answers

"best_split_info" check failure encountered while fitting LightGBM classifier

I came across the following error while fitting a LightGBM classification model. All of the features in use are numerical with around 20% missing values. The target variable is binary. Could I know how this error (Check failed:…
Wang Shenghao
  • 83
  • 1
  • 6
3
votes
1 answer

Pred_leaf in lightgbm

While going through the LightGBM docs I found that predict supports a pred_leaf argument. The docs say pred_leaf (bool, optional (default=False)) – Whether to predict leaf index. However, when doing a data := (1, 28) gbm := num_boost_round =…
IanQ
  • 1,831
  • 5
  • 20
  • 29
3
votes
1 answer

What's the difference between using these 2 approaches to light gbm classifier?

I want to use some Light gbm functions properly. This is standard approach, it's no different than any other classifier from sklearn: define X, y train_test_split create classifier fit on train predict on test compare X_train, X_test, y_train,…
kaban
  • 423
  • 1
  • 5
  • 10
3
votes
1 answer

Get LightGBM/ LGBM run with GPU on Google Colabratory

I often run LGBM on Google Colabratory and I just found out this page saying that LGBM it set to CPU by default so you need to set up first. https://medium.com/@am.sharma/lgbm-on-colab-with-gpu-c1c09e83f2af So I executed the code recommended on the…
Higashi Yutaka
  • 181
  • 2
  • 11
3
votes
1 answer

How to pass multiple hyperparameters to LightGBM after optimization?

I have used another optimization algorithm that returns me best params for Light GBM. hyper_optimized_clf_classifier = Util.hp_opt(lgb.LGBMClassifier(silent=True, random_state=1), X, y, score, verbose=True, n_estimators…
ERJAN
  • 23,696
  • 23
  • 72
  • 146
3
votes
2 answers

Custom multi-class log-loss function for lightGBM in python returns error

I am trying to implement a lightGBM classifier with a custom objective function. My target data has four classes and my data is divided into natural groups of 12 observations. The custom objective function achieve two things: The predicted model…
user3725021
  • 566
  • 3
  • 14
  • 32
3
votes
2 answers

How can i solve problem with installing lightgbm gpu on windows 10?

I'm trying to install lightgbm gpu on Windows 10 pro x64. My GPU is NVIDIA Geforce GTX 950. I tried to follow this guide first: https://lightgbm.readthedocs.io/en/latest/GPU-Windows.html where I used Mingw for compiling. The result was that I…
3
votes
1 answer

How to tell the shap tree explainer and shap values calculator which variables are categorical?

I need to understand my LightGBM model better, so I am using SHAP Tree explainer. The lightgbm needs the data to be encoded and I am passing the same data to the tree explainer. So, I am worried that the SHAP TreeExplainer and shap_values() are…
sameershah141
  • 338
  • 4
  • 7
3
votes
3 answers

If I LabelEncode categorical data, do I still need to use categorical_feature when creating a LightGBM dataset?

I am trying to create a simple model in lightgbm using two features, one is categorical and the other is a distance. I am following a tutorial (https://sefiks.com/2018/10/13/a-gentle-introduction-to-lightgbm-for-applied-machine-learning/) which…
lwang94
  • 81
  • 1
  • 7
3
votes
0 answers

How to use lightGBM in multi-classification problem whose target has multi-labels

I get a multi-class classification problem that the samples can have more than one labels. So I want to know how to use lightGBM in such multi-class classification problems. For examples, the target is as follows: id label1 label2 label3 label4…
Bowen Peng
  • 1,635
  • 4
  • 21
  • 39
3
votes
1 answer

Why can't I match LGBM's cv score?

I'm unable to match LGBM's cv score by hand. Here's a MCVE: from sklearn.datasets import load_breast_cancer import pandas as pd from sklearn.model_selection import train_test_split, KFold from sklearn.metrics import roc_auc_score import lightgbm as…
3
votes
2 answers

What is lightgbm's query information concept (for map metric)?

I'm trying to activate lightgbm with the 'map' metric (I'll explain why i do it in the end of this post), with the following parameters dict (using sklearn API): param = { 'objective': 'binary', 'num_threads': 40, 'metric': 'map', …
3
votes
0 answers

Partial dependence plots with min/max (interval) and not only average in Python

Good day, I have applied lightGBM algorithm to real estate price data set (85524 observations and 167 features). I want to receive the interaction between year and real estate area size to price. The dependent variable is transformed with log1p to…
3
votes
1 answer

Number of trees in multiclass classification in LightGBM

I am using iris dataset to perform multi-class classification using LightGBM. The code snippet is given below: from sklearn import datasets from sklearn.model_selection import train_test_split import pandas as pd import numpy as np from time import…
abhishek jha
  • 1,065
  • 4
  • 21
  • 41
3
votes
1 answer

GridSearch LightGBM with GPU

How do you use a GPU to do GridSearch with LightGBM? If you just want to train a lgb model with default parameters, you can do: dataset = lgb.Dataset(X_train, y_train) lgb.train({'device': 'gpu'}, dataset) To do GridSearch, it would be great to do…
tgordon18
  • 1,562
  • 1
  • 19
  • 31