Skip to content

Commit

Permalink
chore: upate .lintr config and minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
m-muecke committed Feb 12, 2025
1 parent 43f9a11 commit 13d1aba
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
1 change: 0 additions & 1 deletion .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ linters: linters_with_defaults(
# the following setup changes/removes certain linters
assignment_linter = NULL, # do not force using <- for assignments
object_name_linter = object_name_linter(c("snake_case", "CamelCase")), # only allow snake case and camel case object names
cyclocomp_linter = NULL, # do not check function complexity
commented_code_linter = NULL, # allow code in comments
line_length_linter = line_length_linter(120L),
object_length_linter = object_length_linter(40L),
Expand Down
6 changes: 3 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@

# mlr3cluster 0.1.1

* Eight new learners
* Added `assignments` and `save_assignments` fields to `LearnerClust` class
* Eight new learners
* Added `assignments` and `save_assignments` fields to `LearnerClust` class

# mlr3cluster 0.1.0

* Initial upload to CRAN
* Initial upload to CRAN
7 changes: 5 additions & 2 deletions R/LearnerClust.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ LearnerClust = R6Class("LearnerClust",
initialize = function(id, param_set = ps(), predict_types = "partition", feature_types = character(),
properties = character(), packages = character(), label = NA_character_, man = NA_character_) {
super$initialize(
id = id, task_type = "clust", param_set = param_set,
id = id,
task_type = "clust",
param_set = param_set,
predict_types = predict_types,
feature_types = feature_types, properties = properties,
feature_types = feature_types,
properties = properties,
packages = c("mlr3cluster", packages),
label = label,
man = man
Expand Down
20 changes: 14 additions & 6 deletions R/MeasureClust.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,26 @@
#' Example cluster measures: [`clust.dunn`][mlr_measures_clust.dunn]
#' @export
MeasureClust = R6Class("MeasureClust",
inherit = Measure, cloneable = FALSE,
inherit = Measure,
cloneable = FALSE,
public = list(
#' @description
#' Creates a new instance of this [R6][R6::R6Class] class.
initialize = function(id, range, minimize = NA, aggregator = NULL, properties = character(),
predict_type = "partition", task_properties = character(),
packages = character(), label = NA_character_, man = NA_character_) {
super$initialize(id,
task_type = "clust", range = range, minimize = minimize,
aggregator = aggregator, properties = properties,
predict_type = predict_type, task_properties = task_properties,
packages = c("mlr3cluster", packages), label = label, man = man
super$initialize(
id = id,
task_type = "clust",
range = range,
minimize = minimize,
aggregator = aggregator,
properties = properties,
predict_type = predict_type,
task_properties = task_properties,
packages = c("mlr3cluster", packages),
label = label,
man = man
)
}
)
Expand Down

0 comments on commit 13d1aba

Please sign in to comment.