-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4.5_ml_evaluation_figures.R
54 lines (42 loc) · 1.45 KB
/
4.5_ml_evaluation_figures.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# ######################################################################
#
## Model evaluation
#
# ######################################################################
# Setting working directory
setwd("~/Desktop/crc_analysis/scripts") #macbook
setwd("C:/Users/Erika Dvarionaite/iCloudDrive/Desktop/crc_analysis/scripts") #windows
# Packages
library(tidyverse)
library(SIAMCAT)
library(yaml)
library(readr)
# ##############################################################################
# general
memory.limit(56000)
memory.size(TRUE)
# Load models
# INDIAN
load("C:/Users/Erika Dvarionaite/iCloudDrive/Desktop/crc_analysis/models/go/IN-CRC_CRC_stage_lasso_model.RData")
siamcat_in <- siamcat
# US
load("C:/Users/Erika Dvarionaite/iCloudDrive/Desktop/crc_analysis/models/go/US-CRC_CRC_stage_lasso_model.RData")
siamcat_us <- siamcat
# Generating ROC curves
model.evaluation.plot(siamcat_in, fn.plot = "../figures/models/evaluation/ROC_IN.pdf")
model.evaluation.plot(siamcat_us, fn.plot = "../figures/models/evaluation/ROC_US.pdf")
# Generating model interpretation plots
model.interpretation.plot(
siamcat_in,
fn.plot = '../figures/models/evaluation/IN_eval.pdf',
consens.thres = 0.5,
limits = c(-3, 3),
heatmap.type = 'zscore',
)
model.interpretation.plot(
siamcat_us,
fn.plot = '../figures/models/evaluation/JP_eval.pdf',
consens.thres = 0.5,
limits = c(-3, 3),
heatmap.type = 'zscore',
)