MyNixOS website logo
Description

Cluster Extension for 'mlr3'.

Extends the 'mlr3' package with cluster analysis.

mlr3cluster

Package website: release | dev

Cluster analysis for mlr3.

r-cmd-check CRANstatus StackOverflow Mattermost

mlr3cluster is an extension package for cluster analysis within the mlr3 ecosystem. It is a successor of clustering capabilities of mlr2.

Installation

Install the last release from CRAN:

install.packages("mlr3cluster")

Install the development version from GitHub:

# install.packages("pak")
pak::pak("mlr-org/mlr3cluster")

Feature Overview

The current version of mlr3cluster contains:

  • A selection of 22 clustering learners that represent a wide variety of clusterers: partitional, hierarchical, fuzzy, etc.
  • A selection of 4 performance measures
  • Two built-in tasks to get started with clustering

Also, the package is integrated with mlr3viz which enables you to create great visualizations with just one line of code!

Cluster Analysis

Cluster Learners

KeyLabelPackages
clust.MBatchKMeansMini Batch K-MeansClusterR
clust.SimpleKMeansK-Means (Weka)RWeka
clust.agnesAgglomerative Hierarchical Clusteringcluster
clust.apAffinity Propagation Clusteringapcluster
clust.cmeansFuzzy C-Means Clustering Learnere1071
clust.cobwebCobweb ClusteringRWeka
clust.dbscanDensity-Based Clusteringdbscan
clust.dbscan_fpcDensity-Based Clustering with fpcfpc
clust.dianaDivisive Hierarchical Clusteringcluster
clust.emExpectation-Maximization ClusteringRWeka
clust.fannyFuzzy Analysis Clusteringcluster
clust.featurelessFeatureless Clustering
clust.ffFarthest First ClusteringRWeka
clust.hclustAgglomerative Hierarchical Clusteringstats
clust.hdbscanHDBSCAN Clusteringdbscan
clust.kkmeansKernel K-Meanskernlab
clust.kmeansK-Meansstats, clue
clust.mclustGaussian Mixture Models Clusteringmclust
clust.meanshiftMean Shift ClusteringLPCM
clust.opticsOPTICS Clusteringdbscan
clust.pamPartitioning Around Medoidscluster
clust.xmeansX-meansRWeka

Cluster Measures

KeyLabelPackages
clust.chCalinski Harabaszfpc
clust.dunnDunnfpc
clust.silhouetteSilhouettecluster
clust.wssWithin Sum of Squaresfpc

Example

library(mlr3)
library(mlr3cluster)

task = tsk("usarrests")
learner = lrn("clust.kmeans")
learner$train(task)
prediction = learner$predict(task = task)

More Resources

Check out the blogpost for a more detailed introduction to the package. Also, mlr3book has a section on clustering.

Future Plans

  • Add more learners and measures
  • Integrate the package with mlr3pipelines (work in progress)

If you have any questions, feedback or ideas, feel free to open an issue here.

Metadata

Version

0.1.10

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows