Description Usage Arguments Value Examples
View source: R/analysis_wrapper.R
This function plots ROC curves and AUC values based on the results of analyzeUJ function.
1 |
values |
the values created in analyzeUJ function for a specific method. Input could be, for example, result$performance$Lasso. |
type |
an optional character string defining the type of ROC curve desired. Default is 'avg'. avg: ROC curve averaged over all folds of k-fold cross-validation. each: ROC curves for each fold of k-fold cross-validation. |
err |
an optional logical value True or False. Defining if error bar around averaged ROC curve is desired (only if type=avg). Default is True. |
Function plots the desired ROC curve including AUC value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data = data.frame('id'=rep(c(1:5), each=600),
'type'=rep(c('Var1', 'Var2', 'Var3'), times=1000),
'value'=sample(c(0,1), 3000, T),
'date'=rep(seq(as.Date("2000/1/1"), by = "day", length.out=60), each=50))
# use function to create rectangle version of user journey
dat = reshapeData(data, parallel=T, cores=2, na.rm=F)
# use function to analyze data
res = analyzeUJ(dat, target="Var1", missing="median/mode", task="classification", ROC=T)
# use plot function
plotROC(res$performance$Lasso, type="avg", err=T)
{
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.