runParallel: Run Parallel

View source: R/KeelUtils.R

runParallelR Documentation

Run Parallel

Description

Run a set of RKEEL algorithms in parallel

Usage

runParallel(algorithmList, cores)

Arguments

algorithmList

List of RKEEL Algorithms to be executed

cores

Number of cores to execute in parallel. If it is not specified, it detects the cores automatically and execute the experiment in all of them

Value

Returns a list with the executed algorithms

Examples

#Load datasets
iris_train <- RKEEL::loadKeelDataset("iris_train")
iris_test <- RKEEL::loadKeelDataset("iris_test")

#Create algorithms
learner_C45_C <- RKEEL::C45_C(iris_train, iris_test)
learner_KNN_C <- RKEEL::KNN_C(iris_train, iris_test)
learner_Logistic_C <- RKEEL::Logistic_C(iris_train, iris_test)
learner_LDA_C <- RKEEL::LDA_C(iris_train, iris_test)

#Create list
algorithms <- list(learner_C45_C, learner_KNN_C, learner_Logistic_C, 
  learner_LDA_C)

#Run algorithms in parallel in two cores
par <- RKEEL::runParallel(algorithms, 2)

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

Related to runParallel in RKEEL...