
Why is it that xgb.cv performs well but xgb.train does not
This makes sense, since as others have said passing in a watchlist to xgb.cv doesn't make a ton of sense. So the "test" showing in your cv output is not the same data set as the "test" showing in your xgb.train output. xgb.train calls xgb.iter.eval in order to evaluate the test statistics of the in-sample and watchlist data.
metric - XGBClassifier and XGBRegressor - Cross Validated
Feb 1, 2018 · I am a newbie to Xgboost and I would like to use it for regression, in particular, car prices prediction. I started following a tutorial on XGboost which uses XGBClassifier and objective= 'binary:
XGBoost Learning to Rank with XGBClassifier - Cross Validated
Jan 19, 2024 · from sklearn.datasets import make_classification import numpy as np import xgboost as xgb # Make a synthetic ranking dataset for demonstration seed = 1994 X, y = make_classification(random_state=seed) rng = np.random.default_rng(seed) n_query_groups = 1 qid = rng.integers(0, n_query_groups, size=X.shape[0]) # Sort the inputs based on query ...
Why the discrepancy between predict.xgb.Booster
Oct 9, 2018 · One way to explain individual predictions of an xgb classifier is to calculate contributions of each feature. To my knowledge there are two packages in R that can do this for you automatically. In the xgboost package you can call the predict.xgb.Booster function at set predcontrib to TRUE.
Classification XGBoost vs Logistic Regression - Cross Validated
Feb 27, 2019 · I have a total of around 35 features after some feature engineering and the features I have are mostly continuous variables. I tried fitting a Logistic Model, an RF model and and XGB Model. They all seem to give me the same performance. My understanding is that XGB Models generally fare a little better than Logistic Models for these kind of ...
Difference in regression coefficients of sklearn's LinearRegression …
Using the Boston housing dataset as example, I'm comparing the Regression Coefficients between Sklearn's LinearRegression() and xgboost's XGBRegressor(). For XGBRegressior, I'm using booser='gbli...
Sample weights in XGBClassifier - Cross Validated
Mar 30, 2020 · I am using Scikit-Learn XGBClassifier API with sample weights. If I multiply sample weights by 2, I get totally different results with exact same parameters and random_state, I am expecting that If...
how to avoid overfitting in XGBoost model - Cross Validated
Jan 4, 2020 · $\begingroup$ @dmartin: Thank you for you upvote but apologies as I somewhat disagree with the point you make. . Unless we are looking at a severely imbalanced problem a performance degradation in terms of AUC-ROC from 90% down to 68% is extremely unlikely to be due to "moderate discrepancies" in the train-test (T-T) s
r - How xgboost uses weight in the algorithm - Cross Validated
Jan 31, 2018 · Is passing weight as a parameter to the xgb.DMatrix same as multiplying our predictor (say y) by the weight ? In more detail, I have a dataset which has the number an accident with 3 possible values, 0, 1, 2. And I want to weight it by the number of days per year the user has been driving, which has values like 1/365, 2/365 ... 364/365, and 365 ...
boosting - xgboost - difference between XGBClassifier.feature ...
Feb 8, 2022 · What is the difference between get_fscore() and feature_importances? Both are explained as feature importance but the importance values are different. # model_smote = XGBClassifier() # model_smote....
- Some results have been removed