Skip to content

mlr3cluster

0.7.0Package record

Cluster Extension for 'mlr3'

1packages dependsuggested by 2
63.5Kdownloads / year
91.0%test coverage
13/13flavors OK

Overview

About

Extends the 'mlr3' package with cluster analysis.

Changes in 0.7.0

Breaking changes

  • clust.ap, clust.dbscan, clust.dbscan_fpc, clust.hdbscan, clust.meanshift, clust.optics, and clust.stdbscan now store $model as a list. Use $native_model for the fitted upstream object (#129).
  • clust.dbscan_fpc no longer offers method = "dist", which treated the features as a distance matrix and either failed or returned wrong clusters.
  • clust.diana no longer exposes stop.at.k, which cluster::diana() ignores since only the default FALSE is implemented.
  • clust.flexmix now uses the upstream default nrep = 3, which runs the EM algorithm three times and keeps the best fit. Set nrep = 1 to restore the previous behavior.
  • clust.kkmeans now only accepts p with alg = "kerninghan", and clust.kmeans_rcpp and clust.MBatchKMeans now only accept tol_optimal_init with initializer = "optimal_init", since the upstream functions ignore them otherwise.
  • clust.kproto now treats logical features as categorical, so a vector-valued lambda must include an entry for each logical feature.
  • tgen("moons") returns the classification task generator from mlr3 again. mlr3cluster 0.6.0 had replaced it with a clustering version, which has been removed. Use as_task_clust(tgen("moons")$generate(n)) to create a clustering task (#128).

New features

  • as_task_clust() now converts a TaskClassif or TaskRegr to a TaskClust by dropping the target from the features. This creates cluster tasks from any task generator in mlr3, e.g. as_task_clust(tgen("spirals")$generate(n)).

Other improvements

  • clust.cobweb, clust.em, clust.ff, and clust.SimpleKMeans now support factor and ordered features, which Weka handles as nominal attributes.
Show all changes in 0.7.0Hide the rest of the changes in 0.7.0
  • clust.flexmix no longer requires k, so unsetting it infers the number of components from cluster.
  • clust.kmeans_rcpp and clust.MBatchKMeans now check that CENTROIDS is a matrix when it is set, instead of failing in ClusterR during training.
  • clust.tclust now supports the Gaussian parsimonious clustering models via restr = "GPCM" and the new pars parameter.
  • LearnerClust$save_assignments now checks that it is set to a single TRUE or FALSE.

Bug fixes

  • clust.ap now predicts with the similarity function s used for training, which it stores in the model.
  • clust.ap can now predict with a similarity function s that has no sel argument, e.g. function(x) -as.matrix(dist(x))^2. Previously, training worked but predicting failed.
  • clust.clara (metric, medoids.x, and stand), clust.dbscan_fpc (scale and seeds), and clust.pam (stand) now use the training values for prediction checks. Changing these parameters after training no longer bypasses the checks or incorrectly prevents prediction.
  • clust.cmeans now accepts zero weights, as long as at least one weight is positive, matching e1071::cmeans().
  • clust.cmeans, clust.kkmeans, clust.kmeans, clust.kmeans_rcpp, clust.kproto, and clust.MBatchKMeans now match initial cluster centers to the task features by column name instead of by position.
  • clust.cobweb, clust.em, clust.ff, clust.kmodes, clust.kproto, and clust.SimpleKMeans now treat logical features as categorical. Previously, they could be ignored or encoded differently in training and prediction.
  • clust.dbscan_fpc now accepts whole-number doubles such as c(10, 20) for countmode. Previously, only integer vectors were accepted.
  • clust.featureless now predicts with the num_clusters used for training.
  • clust.meanshift now predicts with the convergence parameters thr and iter used for training, which it stores in the model.
  • clust.optics, clust.skmeans, clust.stdbscan, and clust.tclust now reject hyperparameter values that always fail upstream: minPts = 0 for clust.optics, negative approx for clust.optics and clust.stdbscan, method = "kmndirs" for clust.skmeans, and trace values above 1 for clust.tclust.
  • clust.protoclust now predicts with the distance parameters method, diag, upper, and p used for training, which it stores in the model.
  • clust.silhouette now returns NaN instead of an error when every observation is in its own cluster, e.g. for small test sets in resampling.
  • clust.specc now uses the selected kernel when no kernel parameters are set. Previously, it always used an RBF kernel with an estimated sigma in this case.
  • clust.xmeans now initializes C to 0.5 so that it is always passed to Weka. Previously, Weka reset C to 0 whenever any other parameter was set.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 5.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-10-15
  • ERROR12 OK, 1 ERROR2026-09-25
  • OK13 OK2026-09-21
  • ERROR12 OK, 1 ERROR2026-09-20
  • OK13 OK2026-08-05
Show 4 earlier changesHide 4 earlier changes
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-08
  • NOTE12 OK, 1 NOTE2026-06-07
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.7.0
READMEYes · 618 wordsVignettesNoNEWSYes · 100% structured · mentions 0.7.0Citation fileNoWebsiteYes · pkgdown
Help pages
61includes a package overview page
Examples that run
100%45 run in a plain check (40 of them under a condition)
Exported functions with examples
98%
Documented parameters
75%
Return-value docs
4%
Help pages citing references
74%

Downloads

63.5K
CRAN downloads in the past year
Rank #1,733 · ~174/day · ~5.3K/mo
Daily download trend is not available in this view yet.
4K30 days
12.2K90 days
63.5K1 year
Compare downloads with other packages →
Also on2.9K r2u7 autocran3.4K conda_forge

Repository

27Stars
6Forks
2Open issues
1Open PRs
17Releases
784Commits
14Commit identities
mlr3cluster-analysisclusteringrr-packagemachine-learning
License file reads as LGPL-3.0 · 784 commits · Last activity 2026-10-18 · 0% stars, 30d · Default branch at 0.7.0.9000, ahead of CRAN 0.7.0 (checked 2026-10-21)
Responsiveness
How these are sampled
PRs merged (all time)
92%
Median days to close, 50 most recently updated closed issues
29
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-07-28 · 252026-08-31 · 27
PracticesBeta

16 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/mlr-org/mlr3cluster on 2026-10-21.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, and on R-devel

Governance and community (3)
Contributing guide (inherited from mlr-org)

Funding links: GitHub Sponsors

The repository owner accepts GitHub Sponsors

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-18 · The repository has a site deploy workflow

pkgdown site last built 2026-10-18

CRAN release process (1)
cran-comments.md
Show all practicesHide 2 practices
Automation and maintenance (2)
Dependabotpre-commit
Lint, format, editor (4)
lintrAirEditorConfigRStudio project
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-02-04
    Named in .Rbuildignore: .claude, CLAUDE.md
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 1 crediting it in the message
  • Gemini CLIfirst seen on or before 2026-07-18
    Config: a file or ignore line, not recorded which
  • Cursorfirst seen 2026-08-17
    Named in .Rbuildignore: .cursor
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
Models named in its commits
  • Claude Opus 51 commit · Sep 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
38 external dependencies (excludes base and recommended)

Installing mlr3cluster adds 24 packages (11 with compiled code, 16 MB of source tarballs). Heaviest: data.table 5.7 MB, palmerpenguins 2.9 MB, mlbench 967 KB.

Depends (2)
R >= 3.5.0mlr3
Imports (11)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
1indirect
Imports 1
Suggested by 2
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (4)
Author, Maintainer since 0.1.11 (2025) · added in 0.1.10
Contributor · added in 0.1.11

Previously maintained by Damir Pulatov (0.1.0 to 0.1.10).

Releases (20)

Pick two releases to compare their code metrics.

  • 0.7.0Latest
    record
    2026-10-17 · current release · diff ↗ ·
    removed 1 export
    TaskGeneratorMoons
  • 0.6.0
    record
    2026-09-17 · diff ↗ ·
    added 3 exports
    TaskGeneratorBlobs, TaskGeneratorMoons, as_tasks_clust
  • 0.5.0
    record
    2026-08-21 · diff ↗ ·
    added 3 exports
    LearnerClustGMeans, LearnerClustKMeansRcpp, LearnerClustKModes
  • 0.4.1
    record
    2026-07-10 · diff ↗
  • 0.4.0
    record
    2026-06-11 · diff ↗ ·
    added 8 exports
    LearnerClustFlexmix, LearnerClustGenie, LearnerClustKCCA, LearnerClustMovMF, LearnerClustSKMeans, LearnerClustSOM, LearnerClustSTDBSCAN, LearnerClustTclust
  • R
    R 4.6.0 released · 2026-04-24
  • 0.3.0
    record
    2026-03-01 · diff ↗ ·
    added 3 exports
    LearnerClustCLARA, LearnerClustKProto, LearnerClustSpectral
  • 0.2.0
    record
    2026-02-04 · diff ↗ ·
    added 1 export
    LearnerClustProtoclust
  • 0.1.12
    record
    2025-11-19 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.11
    record
    2025-02-19 · diff ↗
  • 0.1.10
    record
    2024-10-04 · diff ↗ ·
    added 2 exports
    LearnerClustBICO, LearnerClustBIRCH
  • R
    R 4.4.0 released · 2024-04-24
  • 0.1.9
    record
    2024-03-18 · diff ↗ ·
    added 3 exports
    LearnerClustDBSCANfpc, LearnerClustHDBSCAN, LearnerClustOPTICS
  • R
    R 4.3.0 released · 2023-04-21
  • 0.1.8
    record
    2023-03-12 · diff ↗
Show 11 earlier eventsHide 11 earlier events
  • 0.1.7
    record
    2023-03-10 · diff ↗
  • 0.1.6
    record
    2022-12-22 · diff ↗
  • 0.1.5
    record
    2022-11-01 · diff ↗ ·
    added 1 export
    LearnerClustMclust
  • 0.1.4
    record
    2022-08-14 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.1.3
    record
    2022-04-06 · diff ↗
  • 0.1.2
    record
    2021-09-03 · diff ↗ ·
    added 3 exports
    LearnerClustHclust, as_prediction_clust, as_task_clust
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.1
    record
    2020-11-16 · diff ↗ ·
    added 8 exports
    LearnerClustAP, LearnerClustCobweb, LearnerClustEM, LearnerClustFarthestFirst, LearnerClustKKMeans, LearnerClustMeanShift, LearnerClustMiniBatchKMeans, LearnerClustSimpleKMeans
  • 0.1.0
    record
    2020-10-01
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2020-10-01
Total releases
20 / 6 yrs
License
LGPL-3 OSI
Minimum R
≥ 3.5.0
Download size
274 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("mlr3cluster")
Mücke, M., Becker, M., Lang, M., & Pulatov, D. (2026). mlr3cluster: Cluster Extension for 'mlr3' (Version 0.7.0) [Computer software]. https://doi.org/10.32614/CRAN.package.mlr3cluster

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for mlr3cluster version 0.7.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy