MyNixOS website logo
Description

Cluster Extension for 'mlr3'.

Extends the 'mlr3' package with cluster analysis.

mlr3cluster

Cluster analysis for mlr3

r-cmd-check CRAN status 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:

devtools::install_github("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

IDLearnerPackage
clust.agnesAgglomerative Hierarchical Clusteringcluster
clust.apAffinity Propagation Clusteringapcluster
clust.cmeansFuzzy C-Means Clusteringe1071
clust.cobwebCobweb Clustering AlgorithmRWeka
clust.dbscanDensity-based Clusteringdbscan
clust.dbscan_fpcDensity-based Clustering with fpcfpc
clust.dianaDivisive Hierarchical Clusteringcluster
clust.emExpectation-Maximization ClusteringRWeka
clust.fannyFuzzy Clusteringcluster
clust.featurelessSimple Featureless Clusteringmlr3cluster
clust.ffFarthestFirst Clustering AlgorithmRWeka
clust.hdbscanHDBSCAN Clusteringdbscan
clust.hclustAgglomerative Hierarchical Clusteringstats
clust.kkmeansKernel K-Means Clusteringkernlab
clust.kmeansK-Means Clusteringstats
clust.mclustGaussian Mixture Models-Based Clusteringmclust
clust.MBatchKMeansMini Batch K-Means ClusteringClusterR
clust.meanshiftMean Shift ClusteringLPCM
clust.opticsOPTICS Clusteringdbscan
clust.pamClustering Around Medoidscluster
clust.SimpleKMeansK-Means Clustering (WEKA)RWeka
clust.xmeansK-Means with Automatic Determination of kRWeka

Cluster Measures

IDMeasurePackage
clust.dunnDunn indexfpc
clust.chCalinski Harabasz Pseudo F-Statisticfpc
clust.silhouetteRousseeuw's Silhouette Quality Indexcluster
clust.wssWithin Sum of Squaresfpc

Example

library(mlr3)
library(mlr3cluster)

task = tsk("usarrests")
learner = lrn("clust.kmeans")
learner$train(task)
preds = 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.9

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • 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