#' @title Table of statistics indicators
#'
#' @description Create a data frame with several descriptive statistical indicators : AUC (for training and/or test set); Recognition rate (for train and/or complete dataset), and statistical confidence
#'
#' @param df_trainvalid dataframe of postprob frequency
#' @param df_compl (optional)
#'
#' @return Dta frame of statistical descriptors
#'
#' @export
create_df_indic_stat <- function(df_trainvalid, df_compl=data.frame(POST_PROB=0)){
AUCs <- calcAUC(df_trainvalid)
tauxreco <- data.frame(training = recognition_rate(df_trainvalid),
complete = recognition_rate(df_compl))
conf_stat <- conf_stat(df_trainvalid)
indicstats <- data.frame(trainAUC = AUCs$training,
valAUC = AUCs$validation,
trainReco = tauxreco$training/100,
complReco = tauxreco$complete/100,
confstat = round(mean(conf_stat$prct_sup95[which(conf_stat$lower >= 1E-3)]/100, na.rm=T), 3))
return(indicstats)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.