
#' Computes best model of a metal clf #' #' @description Get best metal model #' @param X: dataset to classify #' @param y: variable to predict #' @param clf: an object containing the different parameters of the classifier #' @param clf_res: the result of metal #' @param k_penalty: penalty for k #' @return A list of result of best model for each k, their importance feature of each best model, individuels wrongly classified #' @export getTheBestMetalModel<- function(clf, clf_res, X, k_penalty=0.01, evalToOrder="accuracy_",selected=1) if(length(clf_res)==3) clf_res<-clf_res$classifier pop<-modelCollectionToPopulation(clf_res$models) acc <- populationGet_X(evalToOrder)(pop) k <- populationGet_X("eval.sparsity")(pop) acc.penalty <- acc-(k*k_penalty) best.acc <- max(acc.penalty) epsilon <- sqrt(best.acc*(1-best.acc)/ncol(X)) pop2 <- pop[acc.penalty>(best.acc - epsilon)] mod <- getMaxMinPrevalenceModel(pop2,X,selected=selected) return(mod) Generate a metal list of clfs containing information on the generators and unificators
generator_metal.Rd
Generate a metal list of clfs containing information on the generators and unificators