Skip to content

Commit

Permalink
update Trees
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianPi committed Jun 18, 2024
1 parent 4878ce7 commit dc9a422
Show file tree
Hide file tree
Showing 5 changed files with 1,013 additions and 1,013 deletions.
6 changes: 3 additions & 3 deletions B1-Trees.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ tuning_results =
data_xg = xgb.DMatrix(data = as.matrix(train_inner[,-1]), label = train_inner$survived)
model = xgboost(data_xg, nrounds = 16L, eta = hyper_eta[k], max_depth = hyper_depth[k])
model = xgboost(data_xg, nrounds = 16L, eta = hyper_eta[k], max_depth = hyper_depth[k], objective = "reg:logistic")
predictions = predict(model, newdata = as.matrix(test_inner)[,-1])
auc_inner[j]= Metrics::auc(test_inner$survived, predictions)
Expand Down Expand Up @@ -611,7 +611,7 @@ tuning_results =
data_xg = xgb.DMatrix(data = as.matrix(train_inner[,-1]), label = train_inner$survived)
model = xgboost(data_xg, nrounds = 16L, eta = hyper_eta[k], max_depth = hyper_depth[k])
model = xgboost(data_xg, nrounds = 16L, eta = hyper_eta[k], max_depth = hyper_depth[k], objective = "reg:logistic")
predictions = predict(model, newdata = as.matrix(test_inner)[,-1])
auc_inner[j]= Metrics::auc(test_inner$survived, predictions)
Expand All @@ -630,7 +630,7 @@ Make predictions:
```{r, results='hide', warning=FALSE, message=FALSE}
data_xg = xgb.DMatrix(data = as.matrix(data_obs[,-1]), label = data_obs$survived)
model = xgboost(data_xg, nrounds = 16L, eta = results[which.max(results$AUC), 2], max_depth = results[which.max(results$AUC), 1])
model = xgboost(data_xg, nrounds = 16L, eta = results[which.max(results$AUC), 2], max_depth = results[which.max(results$AUC), 1], objective = "reg:logistic")
predictions = predict(model, newdata = as.matrix(data_new)[,-1])
Expand Down
4 changes: 2 additions & 2 deletions _freeze/B1-Trees/execute-results/html.json

Large diffs are not rendered by default.

Loading

0 comments on commit dc9a422

Please sign in to comment.