Skip to content

Commit 2a9110d

Browse files
committed
Fixed grid for decision boundary matrix
1 parent e5f6e8a commit 2a9110d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/commonMachineLearningClassification.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@
520520
x_max <- xBreaks[length(xBreaks)]
521521
y_min <- yBreaks[1]
522522
y_max <- yBreaks[length(yBreaks)]
523-
# Adjust the graining
524-
hs <- min(c(diff(range(xBreaks)), diff(range(yBreaks)))) / 50
525-
grid <- as.data.frame(expand.grid(seq(x_min, x_max, by = hs), seq(y_min, y_max, by = hs)))
523+
xseq <- seq(x_min, x_max, length.out = 100)
524+
yseq <- seq(y_min, y_max, length.out = 100)
525+
grid <- as.data.frame(expand.grid(xseq, yseq))
526526
colnames(grid) <- colnames(predictors)
527527
classificationResult <- jaspResults[["classificationResult"]]$object
528528
if (type == "lda") {

0 commit comments

Comments
 (0)