Skip to content
Snippets Groups Projects
Commit f4b6a9b1 authored by Marder's avatar Marder
Browse files

matching

parent 7d17e310
No related branches found
No related tags found
No related merge requests found
library(dplyr)
library(tidyr)
library(margins)
<<<<<<< HEAD
library(lubridate)
library(caret)
library(randomForest)
=======
library(pROC)
>>>>>>> e410a7a5c52ecf34b454cff74f0b641cd5615679
library(xgboost)
# Test treatment effect
......@@ -67,7 +64,7 @@ data$predicted.classes <- ifelse(data$probabilities >= cut_off, 1, 0)
# Model accuracy
mean(data$predicted.classes == data$Choice_Treat, na.rm = T)
<<<<<<< HEAD
......@@ -145,7 +142,8 @@ table(labeled_data$Choice_Treat, labeled_data$PredictedGroup)
unlabeled_predictions <- predict(model3, newdata = unlabeled_data)
unlabeled_data$PredictedGroup <- unlabeled_predictions
print(model3$bestTune)
=======
table(data$predicted.classes ,data$Choice_Treat)
calculate_metrics <- function(confusion_matrix) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment