title: XGboost model consistently obtaining 100% accuracy?
body: <p>I'm working with Airbnb's data, available <a href="https://www.kaggle.com/c/airbnb-recruiting-new-user-bookings" rel="nofollow noreferrer">here</a> on Kaggle , and predicting the countries users will book their first trips to with an XGBoost model and almost 600 features in R. Running the algorithm through 50 rounds of 5-fold cross validation, I obtained 100% accuracy each time. After fitting the model to the training data, and predicting on a held out test set, I also obtained 100% accuracy. These results can't be real. There must be something wrong with my code, but so far I haven't been able to figure it out. I've included a section of my code below. It's based on this <a href="https://rpubs.com/mharris/multiclass_xgboost" rel="nofollow noreferrer">article</a>. Following along with the article (using the article's data + copying the code), I receive similar results. However applying it to Airbnb's data, I consistently obtain 100% accuracy. I have no clue what is going on. Am I using the xgboost package incorrectly? Your help and time is appreciated. </p>
  
  <pre><code># set up the data  
  # train is the data frame of features with the target variable to predict
  full_variables &lt;- data.matrix(train[,-1]) # country_destination removed
  full_label &lt;- as.numeric(train$country_destination) - 1 
  
  # training data 
  train_index &lt;- caret::createDataPartition(y = train$country_destination, p = 0.70, list = FALSE)
  train_data &lt;- full_variables[train_index, ]
  train_label &lt;- full_label[train_index[,1]]
  train_matrix &lt;- xgb.DMatrix(data = train_data, label = train_label)
  
  # test data 
  test_data &lt;- full_variables[-train_index, ]
  test_label &lt;- full_label[-train_index[,1]]
  test_matrix &lt;- xgb.DMatrix(data = test_data, label = test_label)
  
  # 5-fold CV
  params &lt;- list("objective" = "multi:softprob",
                 "num_class" = classes,
                 eta = 0.3, 
                 max_depth = 6)
  cv_model &lt;- xgb.cv(params = params,
                 data = train_matrix,
                 nrounds = 50,
                 nfold = 5,
                 early_stop_round = 1,
                 verbose = F,
                 maximize = T,
                 prediction = T)
  
  # out of fold predictions 
  out_of_fold_p &lt;- data.frame(cv_model$pred) %&gt;% mutate(max_prob = max.col(., ties.method = "last"),label = train_label + 1)
  head(out_of_fold_p)
  
  # confusion matrix
  confusionMatrix(factor(out_of_fold_p$label), 
                  factor(out_of_fold_p$max_prob),
                  mode = "everything")
  </code></pre>
  
  <p>Sample of the data I used for this can be found here by running this code: </p>
  
  <pre><code>library(RCurl)
  x &lt; getURL("https://raw.githubusercontent.com/loshita/Senior_project/master/train.csv")
  y &lt;- read.csv(text = x)
  </code></pre>