What is the meaning of min_sum_hessian_in_leaf in lightgbm?

What is the meaning of min_sum_hessian_in_leaf in lightgbm (see http://lightgbm.readthedocs.io/en/latest/Parameters.html)? I know that the hessian is a matrix of second order derivatives but I...

Error importing LGBMResgressor to lightgib

I'm getting the following error while importing LGBMResgressor to lightgbm: ImportError Traceback (most recent call last) <ipython-input-38-1a53b4f7b770> in <module>() 5 from...

Dependencies and packages conflicts in Anaconda?

I'm using Anaconda 5.1 and Python 3.6 on a Windows 10 machine. I'm having quite a few problems ; I tried to add some useful tools such as lightGBM, tensorflow, keras, bokeh,... to my conda...

LightGBM Image Not Found after Mac install

I installed the lightgbm package with pip (version 10.0.1) to my Python lib (version 3.6.3) on macOS Sierra (version 10.12.6), along with the dependencies found in the documentation, including...

using lightgbm with average precision recall score

I am using LightGBM and would like to use average precision recall as a metric. I tried defining feval: cv_result = lgb.cv(params=params, train_set=lgb_train, feature_name=Rel_Feat_Names,...

Access trees and nodes from LightGBM model

In sci-kit learn, it's possible to access the entire tree structure, that is, each node of the tree. This allows to explore the attributes used at each split of the tree and which values are used...

ValueError: Circular reference detected in LightGBM

I get the following error when I train LightGBM model: # Train the model import lightgbm as lgb lgb_train = lgb.Dataset(x_train, y_train) lgb_val = lgb.Dataset(x_test, y_test) parameters = { ...

Save LGBMRegressor model from python lightgbm package to disc

Hi I am unable to find an way to save and reuse an LGBM model to a file. I used python package lightgbm and LGBMRegressor model. Could you please help? Documentations doesn't seem to have useful...

Why does `categorical_feature` of lightgbm not work?

I want to use LightGBM to predict the tradeMoney of house, but I get troubles when I have specified categorical_feature in the lgb.Dataset of LightGBM. I get data.dtypes as...

How to store a pandas dataframe in the smallest format possible?

There is a lot of documentation on the most efficient way to store pandas dataframes (e.g. https://stackoverflow.com/questions/17098654/how-to-store-a-dataframe-using-pandas), but most of the...

Save LGBM model in `.cpp` format from Python

If I run from sklearn.datasets import load_breast_cancer import lightgbm as lgb breast_cancer = load_breast_cancer() data = breast_cancer.data target = breast_cancer.target params = { ...

What is the difference between model.LGBMRegressor.fit(x_train, y_train) and lightgbm.train(train_data, valid_sets = test_data)?

I tried out two ways of implementing light GBM. Expect it to return the same value but it didnt. I thought lgb.LightGBMRegressor() and lgb.train(train_data, test_data) will return the same...

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...

lightGBM classifier errors on class_weights

I want to apply weights to my classes in lgbm (ie. manually force the model to prefer certain categories). I can see what my categories are, but when I make a class weights dict using those...

LightGBM : validation AUC score during model fit differs from manual testing AUC score for same test set

I have a LightGBM Classifier with following parameters: lgbmodel_2_wt = LGBMClassifier(boosting_type='gbdt', num_leaves= 105, max_depth= 11, ...

Score/Predict a large dataset using Dask with Lightgbm

Looking to use a dask distributed cluster to speed up lightgbm scoring/predictions. Essentially looking for the equivalent of ParallelPostFit for lightgbm-- currently appears to only work with...

Early stopping for lightgbm not working when RMSLE is the eval metric

I am trying to train a lightgbm ML model in Python using rmsle as the eval metric, but am encountering an issue when I try to include early stopping. Here is my code: import numpy as np import...

LightGBM error : ValueError: For early stopping, at least one dataset and eval metric is required for evaluation

I am trying to train a LightGBM with gridsearch, I get the below error when I try to train model. ValueError: For early stopping, at least one dataset and eval metric is required for...

AttributeError: module 'tensorflow' has no attribute 'compat' when loading tf.compat.v1.train.SessionRunHook

I can see that this question has been asked before here tensorflow-has-no-attribute-compat but the answer given was to Microsoft Visual C++ 2015-2019 Redistributable (x64) It did not work for the...

Using optuna LightGBMTunerCV as starting point for further search with optuna

I'm trying to use LightGBM for a regression problem (mean absolute error/L1 - or similar like Huber or pseud-Huber - loss) and I primarily want to tune my hyperparameters. LightGBMTunerCV in...

Transform SHAP values from raw to native units with lightgbm Tweedie objective?

The utility of Shapley Additive Explanations (SHAP values) is to understand how each feature contributes to a model's prediction. For some objectives, such as regression with RMSE as an objective...

ModuleNotFoundError: No module named 'deepface'

My code works fine in the local system and then I will decide to shift the code into the server. I just create an anaconda environment and install everything but now it gives no module error....

Tensorflow Custom Metric: SensitivityAtSpecificity

Background The metric for my machine learning task is weight TPR = 0.4 * TPR1 + 0.3 * TPR2 + 0.3 * TPR3. Generally, it asks for a model with higher recall rate while disturbing less negative...

SHAP for a single data point, instead of average prediction of entire dataset

I am trying to explain a regression model based on LightGBM using SHAP. I'm using the shap.TreeExplainer().shap_values(X) method to get the SHAP values, where X is the entire training dataset....

Optuna pass dictionary of parameters from "outside"

I am using Optuna to optimize some objective functions. I would like to create my custom class that "wraps" the standard Optuna code. As an example, this is my class(it is still a work in...

How fix AttributeError: dlsym(0x7fa8b0814da0, XGBoosterGetStrFeatureInfo): symbol not found

I want to run xgb on my Mac (specifications). I followed this instructions: https://towardsdatascience.com/install-xgboost-and-lightgbm-on-apple-m1-macs-cb75180a2dda. The result is the problem...

Python AWS Lambda Error "libgomp.so.1: cannot open shared object file: No such file or directory" from AWS EFS file system mounted on Ubuntu

I have an AWS lambda function connected to an AWS EFS mounted on a EC2 instance of Ubunutu 18. I am getting this error below when importing a LightGBM model i believe. { "errorMessage":...

Fitting customized LGBM parameters in sklearn pipeline

I am working on a binary classifier using LightGBM. My classifier definition looks like following: # sklearn version, for the sake of calibration bst_ = LGBMClassifier(**search_params,...

How to install PyCaret in AWS Glue

How can I properly install PyCaret in AWS Glue? Methods I tried: --additional-python-modules and --python-modules-installer-option Python library path easy_install as described in...

Getting DLL error when running tensorflow/keras program on python gpu 3.8

I am trying to run my simple AI program but I keep getting this DLL error: ImportError: Could not find the DLL(s) 'msvcp140_1.dll'. TensorFlow requires that these DLLs be installed in a...