xgboost Questions

4

I'm using Catboost and would like to visualize shap_values: from catboost import CatBoostClassifier model = CatBoostClassifier(iterations=300) model.fit(X, y,cat_features=cat_features) pool1 = Po...
Unbeatable asked 27/6, 2019 at 12:31

6

I want to use xgboost in python for my upcoming model. However since our production system is in SAS, I am trying to extract decision rules from xgboost and then write a SAS scoring code to impleme...
Tyndale asked 1/2, 2019 at 11:4

0

Since XGBoost 2.0 base_score is automatically calculated if it is not specified when initialising an estimator. I naively thought it would simply use the mean of the target, but this does not seem ...
Disembroil asked 31/7 at 20:49

2

Solved

How do we make sense of SHAP explainer.expected_value? Why is it not the same with y_train.mean() after sigmoid transformation? Below is a summary of the code for quick reference. Full code availab...
Alejoa asked 18/9, 2023 at 9:28

4

Solved

I am having trouble creating a lambda layer for the xgboost library. Im running: Im grabbing a zip of xgboost and it's dependencies from here (https://github.com/alexeybutyrev/aws_lambda_xgboost) a...

3

I have the following code: from xgboost import XGBClassifier print(df_train.shape) print(df_train_labels.shape) clf = clf.fit(df_train, df_train_labels, verbose=True) print("after fit") Here d...
Bearcat asked 29/12, 2017 at 17:55

1

I have hugely imbalanced data where around 96% is class 1 and the rest is class 2, I read a lot online to solution to above problem, In XGBOOST documentation they suggested scale_pos_weight and max...
Celebrant asked 12/10, 2016 at 6:36

2

Solved

I would like to use mlr to run xgboost on right-censored survival data in R. The xgboost code lists an objective function survival:cox which says: survival:cox: Cox regression for right censored...
Internship asked 24/6, 2019 at 6:51

1

How can I train an XGBoost model on a GPU but run predictions on CPU without allocating any GPU RAM? My situation: I create an XGBoot model (tree_method='gpu_hist') in Python with predictor='cpu_pr...
Inmate asked 3/12, 2020 at 16:45

9

I've trained dataset using XGB Classifier, but I got this error in local. It worked on Colab and also my friends don't have any problem with same code. I don't know what that error means... Invalid...

2

Solved

I get a model from Sagemaker of type: <class 'xgboost.core.Booster'> I can score this locally which is great but some google searches have shown that it may not be possible to do "stand...
Sonometer asked 3/5, 2022 at 9:22

5

Solved

I am under anaconda notebook. I have recently installed xgboost but I cannot access XGBClassifier : from xgboost import XGBClassifier When I import only xgboost and write xgboost it prints tha...
Peacoat asked 1/7, 2017 at 7:0

1

I tried to train a XGBoost model using GPU acceleration. When training my model using gridsearch, I get the following warning: UserWarning: [17:29:04] WARNING: /workspace/src/common/error_msg.cc:5...
Parcheesi asked 9/11, 2023 at 16:35

13

When I stop the script manually in PyCharm, process finished with exit code 137. But I didn't stop the script. Still got the exit code 137. What's the problem? Python version is 3.6, process finis...
Selfsacrifice asked 7/4, 2017 at 1:17

4

Is it possible to use XGBoost for multi-label classification? Now I use OneVsRestClassifier over GradientBoostingClassifier from sklearn. It works, but use only one core from my CPU. In my data I h...

3

Solved

I'm trying to run an xgboost regressor model on a dataset without any missing data. # Run GBM on training dataset # Create xgboost object pts_xgb = xgb.XGBRegressor(objective="reg:squarederror...
Tiliaceous asked 24/4, 2021 at 16:40

2

Title. For some reason, xgboost isn't showing up as an option for models I can use in pycaret's regression module. I've installed it as needed link to colab
Otoplasty asked 13/4, 2021 at 4:56

3

Solved

I have four categorial features and a fifth numerical one (Var5). When I try the following code: cat_attribs = ['var1','var2','var3','var4'] full_pipeline = ColumnTransformer([('cat', OneHotEncode...

2

Solved

Edited from a tutorial in Kaggle, I try to run the code below and data (available to download from here): Code: import seaborn as sns import matplotlib.pyplot as plt import numpy as np # linear alg...
Barcot asked 17/3, 2022 at 9:28

5

Solved

Similar to How to pass a parameter to only one part of a pipeline object in scikit learn? I want to pass parameters to only one part of a pipeline. Usually, it should work fine like: estimator = X...
Azoth asked 30/10, 2016 at 13:22

13

I have trained an XGBoostRegressor model. When I have to use this trained model for predicting for a new input, the predict() function throws a feature_names mismatch error, although the input feat...
Avis asked 20/2, 2017 at 7:43

1

I've built an XGBoost model and seek to examine the individual estimators. For reference, this was a binary classification task with discrete and continuous input features. The input feature matrix...
Alms asked 13/9, 2018 at 13:6

3

Solved

I pulled some ML code that ran on kaggle (linux) and tried to run it in a jupyter notebook on a windows machine. Here is the code (some of it): ##### RUN XGBOOST import xgboost as xgb print("\nSe...
Bastogne asked 2/9, 2017 at 5:26

2

I have a dataset like so: print(X_test.dtypes) metric1 int64 rank float64 device_type int8 NA_estimate float64 When I try to make predictions on this data set, I get the following error: y_test_pr...
Ligialignaloes asked 21/2, 2021 at 22:42

7

Is it possible to train a model by xgboost that has multiple continuous outputs (multi-regression)? What would be the objective of training such a model? Thanks in advance for any suggestions
Cushman asked 16/9, 2016 at 21:10

© 2022 - 2024 — McMap. All rights reserved.