generator_metal: #' Computes best model of a metal clf #' #' @description Get...

View source: R/metal.lib.R

generator_metalR Documentation

#' 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

Description

Generate a metal list of clfs containing information on the generators and unificators

Usage

generator_metal(mat, clf = NULL)

Arguments

mat:

a language/learner presence matrix that indicates which algorithms and which languages to explore

clf:

a metal classifier object, with the parameter list.clfs that can be "NULL"

Value

a list of clfs


predomics/predomicspkg documentation built on Dec. 11, 2024, 11:06 a.m.