Learn R Programming

monoClust

Implementation of the Monothetic Clustering algorithm on continuous data set. A lot of extensions are included in the package, including applying Monothetic clustering on data set with circular variables, visualizations with the results, and permutation and cross-validation based tests to support the decision on the number of clusters.

The package performs Monothetic clustering on numerical variables only data. The extended features include clustering on one circular variable, limiting the sets of splitting variables. There are also S3 functions such as print and plot that works for MonoClust output object.

Installation

You can install the released version of monoClust from CRAN with:

install.packages("monoClust")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("vinhtantran/monoClust")

Example

This is a basic example which shows you how to solve a common problem:

library(monoClust)
library(cluster)
data(ruspini)
ruspini4sol <- MonoClust(ruspini, nclusters = 4)
ruspini4sol
#> n = 75 
#> 
#> Node) Split, N, Cluster Inertia, Proportion Inertia Explained,  
#>       * denotes terminal node
#> 
#> 1) root 75 244373.900 0.6344215   
#>   2) y < 91 35  43328.460 0.9472896   
#>     4) x < 37 20   3689.500   *
#>     5) x >= 37 15   1456.533   *
#>   3) y >= 91 40  46009.380 0.7910436   
#>     6) x < 63.5 23   3176.783   *
#>     7) x >= 63.5 17   4558.235   *
#> 
#> Note: One or more of the splits chosen had an alternative split that reduced inertia by the same amount. See "alt" column of "frame" object for details.

Plotting MonoClust tree:

plot(ruspini4sol)

Copy Link

Version

Install

install.packages('monoClust')

Monthly Downloads

189

Version

1.2.1

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Tan Tran

Last Published

February 15th, 2021

Functions in monoClust (1.2.1)

find_split

Find the Best Split
ggcv

GGPlot the Mean Square Error with Error Bar for +/- 1 Standard Error
text_tree

Implementation of Print Labels on MonoClust Tree
print.cv.MonoClust

Print MonoClust Cross-Validation Result
to_deg_rad

Transform Between Degree and Radian
is_MonoClust

Test If The Object is A MonoClust
print.MonoClust

Print Monothetic Clustering Results
predict.MonoClust

Predictions from a MonoClust Object
plot_tree

Plot the monoClust Tree.
make_jump_table

Create Jump Table
splitter

Split Function
medoid

Find Medoid of the Cluster
monoClust-package

monoClust: Perform Monothetic Clustering with Extensions to Circular Data
new_node

Create A New Node for Split Data Frame
perm.test

Permutation Test on Monothetic Tree
error_bar

Make Error Bars
tree_depth

Find Tree Depth Based on Node Indexes
wind_sensit_2007

Existence of Microorganisms Carried in Wind
plot.cv.MonoClust

Plot the Mean Square Error with Error Bar for +/- 1 Standard Error
plot.MonoClust

Plot MonoClust Splitting Rule Tree
wind_sensit_2008

Existence of Microorganisms Carried in Wind
ggpcp

Parallel Coordinates Plot with Circular Variables
inertia_calc

Cluster Inertia Calculation
MonoClust.object

Monothetic Clustering Tree Object
plot_prep_branch

Calculate Branch Coordinates
find_closest

Find the Closest Cut
tree_walk

Traverse a Tree to Find the Leaves (Terminal Nodes)
plot_prep_node

Calculate Nodes Coordinates
test_split

Hypothesis Test at Split
circ_arith

Add/Subtract Circular Values in Degrees/Radian
circ_dist

Distance Matrix of Circular Variables
as_MonoClust

Coerce Similar Object to MonoClust
create_labels

Create Labels for Split Variables
cv.test

Cross-Validation Test on MonoClust
MonoClust

Monothetic Clustering
centroid

Find Centroid of the Cluster
checkem

First Gate Function
cluster_stats

Cluster Statistics Calculation