diff --git a/R/nonstdMetrics.R b/R/nonstdMetrics.R index 098d065..5f85143 100644 --- a/R/nonstdMetrics.R +++ b/R/nonstdMetrics.R @@ -147,7 +147,7 @@ sera <- function(trues, preds, phi.trues=NULL, ph=NULL, pl=FALSE, colnames(df_melt)[2] <- "Model" print(ggplot2::ggplot(df_melt,aes(x=th,y=.data$value,group=.data$Model,color=.data$Model)) + - ggplot2::geom_smooth(method="scam",formula=y ~ s(x, k = 30, bs = "mpd"),span=0.1,se=FALSE,fullrange=TRUE) + + ggplot2::geom_smooth(method=scam::scam,formula=y ~ s(x, k = 30, bs = "mpd"),span=0.1,se=FALSE,fullrange=TRUE) + ggplot2::xlab(expression("Relevance"~phi(y))) + ylab("SER") + ggplot2::ggtitle("SERA") + ylim(c(0,max_y)) + ggplot2::geom_hline(yintercept=0,colour="black")) @@ -157,7 +157,7 @@ sera <- function(trues, preds, phi.trues=NULL, ph=NULL, pl=FALSE, df <- data.frame(th=th,errors=errors) print(ggplot2::ggplot(df,aes(x=th,y=errors)) + - ggplot2::geom_smooth(method="scam",formula=y ~ s(x, k = 30, bs = "mpd"),span=0.1,se=FALSE,colour="blue") + + ggplot2::geom_smooth(method=scam::scam,formula=y ~ s(x, k = 30, bs = "mpd"),span=0.1,se=FALSE,colour="blue") + ggplot2::xlab(expression("Relevance"~phi(y))) + ylab("SER") + ggplot2::ggtitle(paste0(m.name," SERA = ",round(res,3))) + ylim(c(0,max_y))+ ggplot2::geom_hline(yintercept=0,colour="black") + ggplot2::geom_hline(yintercept=df[2,]$preds,linetype="dashed",colour="darkgrey"))