diff --git a/tests/testthat/test-mlclassificationboosting.R b/tests/testthat/test-mlclassificationboosting.R index 2e85154c..21d66b2b 100644 --- a/tests/testthat/test-mlclassificationboosting.R +++ b/tests/testthat/test-mlclassificationboosting.R @@ -40,7 +40,7 @@ options$noOfFolds <- 5 options$deviancePlot <- TRUE options$outOfBagImprovementPlot <- TRUE options$relativeInfluencePlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclassificationknn.R b/tests/testthat/test-mlclassificationknn.R index f684e420..a41594d3 100644 --- a/tests/testthat/test-mlclassificationknn.R +++ b/tests/testthat/test-mlclassificationknn.R @@ -38,7 +38,7 @@ options$modelValid <- "validationManual" options$noOfFolds <- 5 options$errorVsKPlot <- TRUE options$weightsPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclassificationlda.R b/tests/testthat/test-mlclassificationlda.R index 176bafc8..ec64f16a 100644 --- a/tests/testthat/test-mlclassificationlda.R +++ b/tests/testthat/test-mlclassificationlda.R @@ -19,7 +19,7 @@ options$modelOptimization <- "manual" options$modelValid <- "validationManual" options$multicolTable <- TRUE options$noOfFolds <- 5 -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclassificationrandomforest.R b/tests/testthat/test-mlclassificationrandomforest.R index 2f182217..73a944f1 100644 --- a/tests/testthat/test-mlclassificationrandomforest.R +++ b/tests/testthat/test-mlclassificationrandomforest.R @@ -39,7 +39,7 @@ options$noOfFolds <- 5 options$accuracyDecreasePlot <- TRUE options$purityIncreasePlot <- TRUE options$treesVsModelErrorPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclusteringdensitybased.R b/tests/testthat/test-mlclusteringdensitybased.R index c26459a0..d1f9208e 100644 --- a/tests/testthat/test-mlclusteringdensitybased.R +++ b/tests/testthat/test-mlclusteringdensitybased.R @@ -9,7 +9,7 @@ options$distance <- "normalDensities" options[["kDistancePlot"]] <- TRUE options$modelOptimization <- "manual" options$tsneClusterPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclusteringfuzzycmeans.R b/tests/testthat/test-mlclusteringfuzzycmeans.R index 802ea21f..98f19837 100644 --- a/tests/testthat/test-mlclusteringfuzzycmeans.R +++ b/tests/testthat/test-mlclusteringfuzzycmeans.R @@ -2,7 +2,7 @@ context("Machine Learning Fuzzy C-Means Clustering") # Test fixed model ############################################################# options <- initMlOptions("mlClusteringFuzzyCMeans") -options$predictors <- list("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") +options$predictors <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") options$predictors.types <- rep("scale", length(options$predictors)) options$modelOptimization <- "manual" options$predictionsColumn <- "" @@ -22,7 +22,7 @@ options$predictionsColumn <- "" options$validationMeasures <- TRUE options$modelOptimization <- "optimized" options$tsneClusterPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclusteringhierarchical.R b/tests/testthat/test-mlclusteringhierarchical.R index 87c86d88..3583a0c6 100644 --- a/tests/testthat/test-mlclusteringhierarchical.R +++ b/tests/testthat/test-mlclusteringhierarchical.R @@ -2,7 +2,7 @@ context("Machine Learning Hierarchical Clustering") # Test fixed model ############################################################# options <- initMlOptions("mlClusteringHierarchical") -options$predictors <- list("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") +options$predictors <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") options$predictors.types <- rep("scale", length(options$predictors)) options$modelOptimization <- "manual" options$predictionsColumn <- "" @@ -23,7 +23,7 @@ options$validationMeasures <- TRUE options$dendrogram <- TRUE options$modelOptimization <- "optimized" options$tsneClusterPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclusteringkmeans.R b/tests/testthat/test-mlclusteringkmeans.R index 1176b19a..fceb04db 100644 --- a/tests/testthat/test-mlclusteringkmeans.R +++ b/tests/testthat/test-mlclusteringkmeans.R @@ -2,7 +2,7 @@ context("Machine Learning K-Means Clustering") # Test fixed model ############################################################# options <- initMlOptions("mlClusteringKMeans") -options$predictors <- list("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") +options$predictors <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") options$predictors.types <- rep("scale", length(options$predictors)) options$modelOptimization <- "manual" options$predictionsColumn <- "" @@ -18,7 +18,7 @@ jaspTools::expect_equal_tables(table, # Test optimized model ######################################################### options <- initMlOptions("mlClusteringKMeans") -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) @@ -104,7 +104,7 @@ test_that("t-SNE Cluster Plot matches", { context("Machine Learning K-Medians Clustering") options <- initMlOptions("mlClusteringKMeans") -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) @@ -186,7 +186,7 @@ test_that("Elbow Method Plot matches", { context("Machine Learning K-Medoids Clustering") options <- initMlOptions("mlClusteringKMeans") -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) @@ -198,6 +198,7 @@ options$validationMeasures <- TRUE options$elbowMethodPlot <- TRUE options$clusterMeanPlot <- TRUE options$centers <- "medoids" +options$algorithm <- "clara" options$setSeed <- TRUE options$modelOptimization <- "optimized" options$addPredictions <- FALSE diff --git a/tests/testthat/test-mlclusteringmodelbased.R b/tests/testthat/test-mlclusteringmodelbased.R index 6358b63c..8db4e150 100644 --- a/tests/testthat/test-mlclusteringmodelbased.R +++ b/tests/testthat/test-mlclusteringmodelbased.R @@ -2,7 +2,7 @@ context("Machine Learning K-Means Clustering") # Test fixed model ############################################################# options <- initMlOptions("mlClusteringModelBased") -options$predictors <- list("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") +options$predictors <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") options$predictors.types <- rep("scale", length(options$predictors)) options$modelOptimization <- "manual" options$predictionsColumn <- "" @@ -17,7 +17,7 @@ jaspTools::expect_equal_tables(table, # Test optimized model ######################################################### options <- initMlOptions("mlClusteringModelBased") -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlclusteringrandomforest.R b/tests/testthat/test-mlclusteringrandomforest.R index 571775ec..121f649a 100644 --- a/tests/testthat/test-mlclusteringrandomforest.R +++ b/tests/testthat/test-mlclusteringrandomforest.R @@ -2,7 +2,7 @@ context("Machine Learning Random Forest Clustering") # Test fixed model ############################################################# options <- initMlOptions("mlClusteringRandomForest") -options$predictors <- list("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") +options$predictors <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width") options$predictors.types <- rep("scale", length(options$predictors)) options$modelOptimization <- "manual" options$predictionsColumn <- "" @@ -35,7 +35,7 @@ options$validationMeasures <- TRUE options$featureImportanceTable <- TRUE options$modelOptimization <- "optimized" options$tsneClusterPlot <- TRUE -options$predictors <- list("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", +options$predictors <- c("Alcohol", "Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlregressionboosting.R b/tests/testthat/test-mlregressionboosting.R index ab2e6ea0..71af7c50 100644 --- a/tests/testthat/test-mlregressionboosting.R +++ b/tests/testthat/test-mlregressionboosting.R @@ -49,7 +49,7 @@ options$deviancePlot <- TRUE options$outOfBagImprovementPlot <- TRUE options$relativeInfluencePlot <- TRUE options$predictedPerformancePlot <- TRUE -options$predictors <- list("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", +options$predictors <- c("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlregressionknn.R b/tests/testthat/test-mlregressionknn.R index b61af0b4..e81bc8c0 100644 --- a/tests/testthat/test-mlregressionknn.R +++ b/tests/testthat/test-mlregressionknn.R @@ -46,7 +46,7 @@ options$modelValid <- "validationManual" options$noOfFolds <- 5 options$errorVsKPlot <- TRUE options$predictedPerformancePlot <- TRUE -options$predictors <- list("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", +options$predictors <- c("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlregressionlinear.R b/tests/testthat/test-mlregressionlinear.R index 9e909c05..148c7572 100644 --- a/tests/testthat/test-mlregressionlinear.R +++ b/tests/testthat/test-mlregressionlinear.R @@ -9,7 +9,7 @@ options$saveModel <- FALSE options$holdoutData <- "holdoutManual" options$modelOptimization <- "manual" options$predictedPerformancePlot <- TRUE -options$predictors <- list("Petal.Width", "Sepal.Length", "Sepal.Width", "Species") +options$predictors <- c("Petal.Width", "Sepal.Length", "Sepal.Width", "Species") options$predictors.types <- c("scale", "scale", "scale", "nominal") options$setSeed <- TRUE options$target <- "Petal.Length" diff --git a/tests/testthat/test-mlregressionrandomforest.R b/tests/testthat/test-mlregressionrandomforest.R index f6426c47..de7d4e13 100644 --- a/tests/testthat/test-mlregressionrandomforest.R +++ b/tests/testthat/test-mlregressionrandomforest.R @@ -48,7 +48,7 @@ options$accuracyDecreasePlot <- TRUE options$purityIncreasePlot <- TRUE options$treesVsModelErrorPlot <- TRUE options$predictedPerformancePlot <- TRUE -options$predictors <- list("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", +options$predictors <- c("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors)) diff --git a/tests/testthat/test-mlregressionregularized.R b/tests/testthat/test-mlregressionregularized.R index fc709fec..161992eb 100644 --- a/tests/testthat/test-mlregressionregularized.R +++ b/tests/testthat/test-mlregressionregularized.R @@ -35,7 +35,7 @@ options$modelOptimization <- "optMin" options$modelValid <- "validationManual" options$noOfFolds <- 5 options$predictedPerformancePlot <- TRUE -options$predictors <- list("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", +options$predictors <- c("Malic", "Ash", "Alcalinity", "Magnesium", "Phenols", "Flavanoids", "Nonflavanoids", "Proanthocyanins", "Color", "Hue", "Dilution", "Proline") options$predictors.types <- rep("scale", length(options$predictors))