rm(list = ls())
library(glmnet)
library(xrnet)
library(doParallel)
library(dplyr)
library(xtune)
library(randomForest)
library(fwelnet)
library(ggplot2)
library(pROC)

# Make sure working directory is ".../JDS2107-007/"
getwd()
sim = 1
load(paste0("RDA/METABRIC/results/metabric_complete_", sim, ".RData"))
objects()

# Table 1
roc(y.test, rr_pred) # Two level ridge
roc(y.test, drop(glm_pred)) # Standard ridge
roc(y.test, drop(aug_pred)) # Augmented Ridge
roc(y.test, drop(fwelnet_pred)) # Feature-weighted elastic net

# Hvae to manually to do for xtune
p <- predict(fit_xtune, X.test, type = "response")
roc(y.test, exp(p) / (1 + exp(p))) # xtune



