Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
TuomasBorman committed Nov 13, 2024
1 parent 2488c77 commit 1199c12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: OMA
Title: Orchestrating Microbiome Analysis with Bioconductor
Version: 0.98.29
Version: 0.98.30
Date: 2024-10-04
Authors@R:
c(person("Leo", "Lahti", role = c("aut"),
Expand Down Expand Up @@ -89,7 +89,6 @@ Suggests:
reshape2,
reticulate,
rgl,
ROCR,
scales,
scater,
sechm,
Expand Down
10 changes: 6 additions & 4 deletions inst/pages/machine_learning.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@ technique for binary classification problems.
library(plotROC)
# Prepare data for ROC
roc_data <- data.frame(D = as.numeric(res[["obs"]] == levels(res[["obs"]])[1]),
M = res[[levels(res[["obs"]])[1]]])
roc_data <- data.frame(
observed_class = as.numeric(res[["obs"]] == "healthy"),
predicted_probability = res[["healthy"]]
)
# Plot ROC with ggplot2
p <- ggplot(roc_data, aes(m = M, d = D)) +
# Plot ROC curve
p <- ggplot(roc_data, aes(m = predicted_probability, d = observed_class)) +
geom_roc() +
style_roc(theme = theme_minimal())
p
Expand Down

0 comments on commit 1199c12

Please sign in to comment.