New answers tagged

0 votes

How can I manually add a root node in XGBoost tree(s)?

It would be best to add that as control logic outside of the model. If you were using Python, it would be something like: ...
user avatar
0 votes

Linear regression returning negative values for house price prediction

This can happen with regression, especially if the training data is too small and/or the test data has important differences with the training data. It can be caused by bias or overfitting, but it's ...
user avatar
  • 21.8k
3 votes

XGboost Classifier predicits different results for same samples depending on test dataset size

So the mistake was to use the DMatrix datatype while using categorical data in the dataset. I split the data and then stored it in a DMatrix with ...
user avatar
  • 41
1 vote

XGBoost custom objective for regression in R

I have a suggestion. Indeed the methodology is the right one but the problem comes from the definition of your functions. Since they are not the right ones, they then give the wrong Grad and Hess. The ...
user avatar
1 vote
Accepted

Why do I get an almost perfect fit as well as bias variance tradeoff with my time series forecast?

Without more details, it seems to me that you have a data leak problem. How did you split the data in train/test? Notice that you're dealing with a time-series problem, so the standard random split ...
user avatar
  • 489
0 votes

How to predict probabilities in xgboost using R?

Many years late, but noticed this; and this is how I do it: pred_s <- predict(bst, x_mat_s2, type="prob") Typically then I then work with probability ...
user avatar
  • 101

Top 50 recent answers are included