@@ -28,7 +28,7 @@
Loading
28 28
              } else if (test_int(x)) {
29 29
                assert_true(x >= 1L)
30 30
              } else {
31 -
                return("`centers`` must be either integer or data.frame with initial cluster centers")
31 +
                return("`centers` must be either integer or data.frame with initial cluster centers")
32 32
              }
33 33
            }
34 34
          ),

@@ -5,7 +5,8 @@
Loading
5 5
#'
6 6
#' @description
7 7
#' A [LearnerClust] for agglomerative hierarchical clustering implemented in [cluster::agnes()].
8 -
#' Predictions are generated using [stats::cutree()].
8 +
#' Predictions are generated using [stats::cutree()] which cuts the tree resulting from
9 +
#' hierarchical clustering into specified number of groups (see parameter `k`).
9 10
#'
10 11
#' @templateVar id clust.agnes
11 12
#' @template section_dictionary_learner
@@ -74,6 +75,11 @@
Loading
74 75
        stop(sprintf("`k` needs to be between 1 and %s", task$nrow))
75 76
      }
76 77
78 +
      msg = "clust.agnes doesn't predict on new data"
79 +
      msg = paste(msg, "and prediction results may not make sense", sep = " ")
80 +
      msg = paste(msg, "if you use it on new data", sep = " ")
81 +
      warning(msg)
82 +
77 83
      partition = stats::cutree(self$model, self$param_set$values$k)
78 84
      PredictionClust$new(task = task, partition = partition)
79 85
    }

@@ -5,7 +5,8 @@
Loading
5 5
#'
6 6
#' @description
7 7
#' A [LearnerClust] for divisive hierarchical clustering implemented in [cluster::diana()].
8 -
#' Predictions are generated using [stats::cutree()].
8 +
#' Predictions are generated using [stats::cutree()] which cuts the tree resulting from
9 +
#' hierarchical clustering into specified number of groups (see parameter `k`).
9 10
#'
10 11
#' @templateVar id clust.diana
11 12
#' @template section_dictionary_learner
@@ -53,6 +54,11 @@
Loading
53 54
        stop(sprintf("`k` needs to be between 1 and %s", task$nrow))
54 55
      }
55 56
57 +
      msg = "clust.diana doesn't predict on new data"
58 +
      msg = paste(msg, "and prediction results may not make sense", sep = " ")
59 +
      msg = paste(msg, "if you use it on new data", sep = " ")
60 +
      warning(msg)
61 +
56 62
      partition = stats::cutree(self$model, self$param_set$values$k)
57 63
      PredictionClust$new(task = task, partition = partition)
58 64
    }
Files Coverage
R 54.55%
Project Totals (17 files) 54.55%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading