Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/testthat/test-mlclassificationboosting.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlclassificationknn.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlclassificationlda.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlclassificationrandomforest.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlclusteringdensitybased.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-mlclusteringfuzzycmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- ""
Expand All @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-mlclusteringhierarchical.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- ""
Expand All @@ -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))
Expand Down
9 changes: 5 additions & 4 deletions tests/testthat/test-mlclusteringkmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- ""
Expand All @@ -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))
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-mlclusteringmodelbased.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- ""
Expand All @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-mlclusteringrandomforest.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 <- ""
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlregressionboosting.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlregressionknn.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlregressionlinear.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlregressionrandomforest.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-mlregressionregularized.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading