lightgbm

Is LightGBM available for Mac M1?

Is LightGBM available for Mac M1? Question: 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 python setup.py egg_info did …

Total answers: 1

How to get non-bar SHAP plot for LightGBM

How to get non-bar SHAP plot for LightGBM Question: I have trained a lightGBM model using this code: from flaml import AutoML #Select Hyper-Parameters automl_final = AutoML() automl_final.fit( X_train, y_train, estimator_list=["lgbm"],#,"xgboost"], task="classification", metric="roc_auc", eval_method="cv", n_splits=3, time_budget=30, sample=True, append_log=True, log_type="all", model_history=True, log_training_metric=True, verbose=3, seed=1234, early_stop=True ) Then I have generated a SHAP bar plot using this …

Total answers: 1

how to solve cpp library confliction within anaconda?

how to solve cpp library confliction within anaconda? Question: I tried to install lightgbm with gpu in anaconda. I used pip in anaconda directly with –install-option=’–gpu’. it’s built successfully and lib_lightgbm.so links to libstdc++.so under /lib64. as anaconda has it’s own libstdc++.so under anaconda3/lib and it’s different from the one under /lib64, when I try …

Total answers: 1

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

LightGBM: train() vs update() vs refit() Question: 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 again: updated_model = lightgbm.train(params=last_model_params, train_set=new_data, init_model = last_model) However, …

Total answers: 1

How to understand Shapley value for binary classification problem?

How to understand Shapley value for binary classification problem? Question: I am very new to shapley python package. And I am wondering how should I interpret the shapley value for the Binary Classification problem? Here is what I did so far. Firstly, I used a lightGBM model to fit my data. Something like import shap …

Total answers: 1

LightGBMError: Do not support special JSON characters in feature name – The same code is working in jupyter but doesn't work in Spyder

LightGBMError: Do not support special JSON characters in feature name – The same code is working in jupyter but doesn't work in Spyder Question: I have the following code: most_important = features_importance_chi(importance_score_tresh, df_user.drop(columns = ‘CHURN’),churn) X = df_user.drop(columns = ‘CHURN’) churn[churn==2] = 1 y = churn # handle undersample problem X,y = handle_undersampe(X,y) # train …

Total answers: 2

How to set hyperparameters with a dictionary

How to set hyperparameters with a dictionary Question: model = lightgbm.LGBMClassifier() hyperparameter_dictionary = {‘boosting_type’: ‘goss’, ‘num_leaves’: 25, ‘n_estimators’: 184, …} How do I set the model’s hyperparameters with the dictionary? Thanks! Asked By: Roc || Source Answers: pass the hyperparam dictionary to the model constructor, adding ** to the dict to pass each dict item …

Total answers: 2

How to pass multiple hyperparameters to LightGBM after optimization?

How to pass multiple hyperparameters to LightGBM after optimization? Question: 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 =(hp.quniform,50,500,50), learning_rate =(hp.qloguniform, np.log(0.05), np.log(0.4),0.001), min_child_weight =(hp.qloguniform,np.log(3),np.log(200),1), reg_lambda = (hp.qloguniform, np.log(2), np.log(100),1), num_leaves = (hp.qloguniform, np.log(5),np.log(64),1), subsample = (hp.quniform, 0.5, 1, 0.05), …

Total answers: 1

Lightgbm early stopping not working properly

Lightgbm early stopping not working properly Question: I’m using lightgbm for a machine learning task. I want to use early stopping in order to find the optimal number of trees given a number of hyperparameters. However, lgbm stops growing trees while still improving on my evaluation metric. Below I’ve attached my specifications: params = { …

Total answers: 1

LightGBMError "Check failed: num_data > 0" with Sklearn RandomizedSearchCV

LightGBMError "Check failed: num_data > 0" with Sklearn RandomizedSearchCV Question: I’m trying LightGBMRegressor parameter tuning with Sklearn RandomizedSearchCV. I got an error with message below. error: LightGBMError: b’Check failed: num_data > 0 at /src/LightGBM/src/io/dataset.cpp, line 27 .n’ I cannot tell why and the specific parameters caused this error. Any of params_dist below was not suitable …

Total answers: 4