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: 2

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

LightGBM on Numerical+Categorical+Text Features >> TypeError: Unknown type of parameter:boosting_type, got:dict

LightGBM on Numerical+Categorical+Text Features >> TypeError: Unknown type of parameter:boosting_type, got:dict Question: Im trying to train a lightGBM model on a dataset consisting of numerical, Categorical and Textual data. However, during the training phase, i get the following error: params = { ‘num_class’:5, ‘max_depth’:8, ‘num_leaves’:200, ‘learning_rate’: 0.05, ‘n_estimators’:500 } clf = LGBMClassifier(params) data_processor = ColumnTransformer([ …

Total answers: 2

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

How can I stop the log output of lightgbm?

How can I stop the log output of lightgbm? Question: I would like to know how to stop lightgbm logging. What kind of settings should I use to stop the log? Also, is there a way to output only your own log with the lightgbm log stopped? Asked By: musako || Source Answers: I think …

Total answers: 4

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: 3

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