From 2921d613e9954d25d422c5968b95082ce979ffc5 Mon Sep 17 00:00:00 2001 From: jreps Date: Thu, 18 Apr 2024 12:28:57 -0400 Subject: [PATCH] Update newRandomForest.R adding R6:: --- R/newRandomForest.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/newRandomForest.R b/R/newRandomForest.R index b9aaad289..a009b8ebf 100644 --- a/R/newRandomForest.R +++ b/R/newRandomForest.R @@ -1,5 +1,5 @@ #library(R6) -HyperparameterNtrees <- R6Class("HyperparameterNtrees", list( +HyperparameterNtrees <- R6::R6Class("HyperparameterNtrees", list( min = NULL, max = NULL, randomSample = 10, @@ -190,7 +190,7 @@ predictSklearnBase <- function( return(cohort) } -RandomForest <- R6Class("RandomForest", list( +RandomForest <- R6::R6Class("RandomForest", list( seed = NULL, nJobs = NULL, modelLocation = NULL, @@ -435,7 +435,7 @@ RandomForest <- R6Class("RandomForest", list( #rfModel$print #library(R6) -CrossValidationSampler <- R6Class("CrossValidationSampler", list( +CrossValidationSampler <- R6::R6Class("CrossValidationSampler", list( seed = NULL, k = NULL, stratified = NULL, @@ -532,7 +532,7 @@ computeAucNew <- function(prediction){ } -PerformanceFunction <- R6Class("PerformanceFunction", list( +PerformanceFunction <- R6::R6Class("PerformanceFunction", list( maxmize = NULL, metricFunctionName = NULL, aggregateFunctionName = NULL, @@ -566,7 +566,7 @@ PerformanceFunction <- R6Class("PerformanceFunction", list( } )) -GridHyperparameter <- R6Class("GridHyperparameter", list( +GridHyperparameter <- R6::R6Class("GridHyperparameter", list( type = 'grid search', hyperparameterList = NULL, currentIndex = 1,