runCV: Run Cross-Validation

View source: R/KeelUtils.R

runCVR Documentation

Run Cross-Validation

Description

Run a cross-validation experiment

Usage

runCV(algorithm, dataset, numFolds, cores)

Arguments

algorithm

Algorithm to be executed in the CV. It must has the parameters to be used in the executions.

dataset

Dataset to perform the CV. It is divided in numFolds disjoint partitions and in each iteration, one is used for test and the rest for train.

numFolds

Number of folds for the cross-validation procedure.

cores

Number of cores to execute in parallel. If it is missed, default value is 1 (sequential execution).

Value

Returns a list with the mean results of the numFolds executions.

Examples

#Load datasets
iris <- RKEEL::loadKeelDataset("iris")

#Create algorithm
learner_C45_C <- RKEEL::C45_C(iris, iris)

#Perform 5-folds CV
results <- RKEEL::runCV(learner_C45_C, iris, 5)

RKEEL documentation built on Sept. 15, 2023, 1:08 a.m.

Related to runCV in RKEEL...