Questions tagged [xgboost]

XGBoost is a library for constructing boosted tree models in R, Python, Java, Scala, and C++. Use this tag for issues specific to the package (i.e., input/output, installation, functionality).

Before using the XGBoost tag, try to test whether your issue is related specifically to the functionality of XGBoost. Often, problems arise from the surrounding model-building environment (such as R's caret or Python's scikit-learn), the quality of the data being used, or purely statistical concerns that might belong on Cross Validated.

2788 questions
1
vote
1 answer

unexpected argument 'eval_metric' in Xgboost

I tried to use the eval_metric argument in XgBoost but got this error: TypeError: fit() got an unexpected keyword argument 'eval_metric' Here is my code: eval_set = [(X_test_np, y_test_np)] model = XGBClassifier() model.fit(X_train_np,…
user2505650
  • 1,293
  • 6
  • 20
  • 38
1
vote
1 answer

xgboost install on tensorflow GPU support

I already install tensorflow GPU support. try install xgboost on tensorflow by 'conda install -c anaconda py-xgboost' I wonder the xgboost what GPU support or not. I don't install…
Myeongjang JO
  • 81
  • 1
  • 8
1
vote
1 answer

Unable to install xgboost Python 3 Mac

I am facing issues while installing xgboost on MacOS 10.10.5. I am using Python 3.6.3. I already tried pip install xgboost but received following error: ---------------------------------------- Command "python setup.py egg_info" failed with…
1
vote
1 answer

R: Using MLR (or caret or....) to tune parameters for XGBoost

Having walked through several tutorials, I have managed to make a script that successfully uses XGBoost to predict categorial prices on the Boston housing dataset. However, I cannot successfully tune the parameters of the model using CV. Even after…
1
vote
1 answer

How to use xgboost algorithm for multi-variable prediction?

I have a set of features: x1, x2, x3. Furthermore, I have a set of labels: y1, y2, y3. For example, my x variables are height, weight and years of education. Each Yi represents a grade in the following fields: Science, Arts and Management. Each…
1
vote
1 answer

R: Missing data causes error with XGBoost / sparse.model.matrix

As far as I can understand, XGB should have the benefit of dealing with missing data, however, whenever I test the Boston housing set with a few NAs added, I get the error: The length of labels must equal to the number of rows in the input data The…
1
vote
4 answers

Error: "base_score > 0.0f && base_score < 1.0f base_score must be in (0,1) for logistic loss" on xgboost 0.7

I have a binary classification problem, and I wanted to try : XGBoost model since I have good results with GradientBoosting (sklearn) model on the same data set. import xgboost as xgb XGB = xgb.XGBClassifier() model = XGB.fit(X_train, y_train) But…
Oussama Jabri
  • 674
  • 1
  • 7
  • 18
1
vote
1 answer

XGBoost running slow on my machine, is it normal?

I am using XGBoost to train 1 million rows and ~15 features from Kaggle project Rossmann Store Sales. It appears very slow. It took 30 mins to train model with no parameter tuning. If I run GridSearchCV to train model with 3 folds and 6 learning…
Justin
  • 69
  • 1
  • 1
  • 4
1
vote
1 answer

Extract both training and testing AUROC from caret 10 fold CV

Say I am doing classification like below: library(mlbench) data(Sonar) library(caret) set.seed(998) my_data <- Sonar fitControl <- trainControl( method = "cv", number = 10, classProbs = T, savePredictions = T, …
Keshav M
  • 1,309
  • 1
  • 13
  • 24
1
vote
1 answer

XGBoost does not use enough all resources while running Spark in AWS EMR

I'm trying to make a binary classification on a big dataset (5million rows x 450 features) using XGBoost Spark lib in AWS EMR. I've attempted setting many different configurations like: Number of XGboost workers, nthreads, spark.task.cpus,…
1
vote
1 answer

Saving xgboost binary prediction to submission csv file

I have 'train.csv' and 'test.csv' files. The former contains 'Id', a list of features, and a 'Status' column with values in it, the 'test.csv' file contains the same columns except the 'Status' one. My task is to train an XGboost model on the…
Vladimir
  • 13
  • 3
1
vote
1 answer

XGBoost: fit() got an unexpected keyword argument 'xgb_model'

According to the documentation, it should be possible to write the code like this: # Instantiate the model model = XGBClassifier() model.fit(x, y, xgb_model='model.xgb') But it fails with : TypeError: fit() got an unexpected keyword argument…
Pek
  • 166
  • 1
  • 15
1
vote
1 answer

Can no longer import xgboost

I have installed Anaconda 3 and lots of packages, including xgboost few months ago and it worked well. But now xgboost stopped working: import fails with OSError: …
Pek
  • 166
  • 1
  • 15
1
vote
1 answer

Numerical stability of gradient and hessian computation of LightGBM and XGBoost

I am looking into the numerical stability of classification with LightGBM and XGBoost. I believe a good place to start is the computation of the gradient and Hessian. These require computation of a logistic function which in my understanding might…
Simon
  • 306
  • 1
  • 12
1
vote
2 answers

Error installing XGBoost on win 10

I'm trying to install xgboost on win 10 but got this error : C:\Users\Philippe>pip install xgboost Collecting xgboost Using cached xgboost-0.6a2.tar.gz No files/directories in…
Jed
  • 43
  • 7
1 2 3
99
100