Category "xgboost"

XGBoost regression predictions are shifted along the y axis

XGboost regression output is scaled on the Y axis as shown in the image below. Ytest vs Ypred I have provided the code below which got me these results. Tried s

Custom objective function for XGBoost including an external data column

I am using XGBoost in order to do a sales forecasting. I need a custom objective function, as the value of the prediction depends on the sales price of an item.

fastshap: Error in UseMethod("explain") : no applicable method for 'explain' applied to an object of class "xgb.Booster"

After fitting a xgboost model (model_n) I try to run the code below to obtain shap-values, where trainval is a dataframe with my traindata without the Y variabe

XGBoost Model performance

I am trying to use XGBoost for classification. I am pretty doubtful on its accuracy. I have applied it with default parameters and the precision is 100%. xg_c

How to deal with overfitting of xgboost classifier?

I use xgboost to do a multi-class classification of spectrogram images(data link: automotive target classification). The class number is 5, training data includ

XGBoost object 'trainD' not found

I was running this code on RStudio param <- list(colsample_bytree = 1, subsample = .6, booster = "gbtree", max_dept

using H2O flow XGboost model

It gives a regression prediction as continuous score with negative values, like -1.27544 < x < 6.68112. How I interpret the negatives?

XGBoost giving a static prediction of "0.5" randomly

I am using a scikit-learn pipeline with XGBRegressor. Pipeline is working good without any error. When I am prediction with this pipeline, I am predicting the

module 'xgboost' has no attribute 'DMatrix'

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 XGBOO

ValueError: multiclass format is not supported , xgboost

My first multiclass classication. I have values X and Y. Y have 5 values [0,1,2,3,4]. But i get this "multiclass format is not supported". Understand that i nee

How to get each individual tree's prediction in xgboost?

Using xgboost.Booster.predict can only get the prediction result of all the tree or the predicted leaf of each tree. But how could I get the prediction value of

multivariate xgboost time series

I implemented a univariate xgboost time series using the following code, def series_to_supervised(data, n_in=1, n_out=1, dropnan=True): n_vars = 1 if type(d

XGBoost best max_depth=1

I use xgboost to train a classification model. GridCVSearch gives the best max_depth=1. This means all my hundreds of trees are split at a single node. Does t

_pickle.UnpicklingError: NEWOBJ class argument isn't a type object

I ran this code on cmd and I face this error. _pickle.UnpicklingError: NEWOBJ class argument isn't a type object my app.py goes like this: # -*- coding: utf-8 -

subsample, colsample_bytree, colsample_bylevel in XGBClassifier() Python 3.x

I've spent a good deal of time trying to find out what these "subsample", "colsample_by_tree", and "colsample_bylevel" actually did in XGBClassifier() but I can

Xgboost tweedie: Why is the formula to get the prediction from the link = exp(link)/ 2?

When I run a Tweedie GLM, one can get the prediction from the link by doing exp(link). To get the prediction for a Tweedie GLM, I get the prediction from the li