explore_cluster_number: Tests for appropriate cluster number

Description Usage Arguments Value

View source: R/cluster_yields.R

Description

Tests for appropriate cluster number

Usage

1
2
3
4
5
6
explore_cluster_number(
  processed_data,
  kmax = 10,
  plot = TRUE,
  output_path = NULL
)

Arguments

processed_data

sf; An sf object likely returned from make_cluster_data. Object should include the features to be clustered and their associated polygon geometries.

kmax

integer; **optional** maximum cluster number to be passed to factoextra::fviz_nbclust and NbClust::NbClust.

plot

logical; **optional** should plot be returned in the current graphics device (likely in RStudio). Default is TRUE.

output_path

string; **optional** path where plot should be saved. Default is NULL. If path is provided, a PDF with the name "suggested_optimal_cluster_number".

Value

A three panel plot showing the relationship between cluster number and total within sum of squares, silhouette width, and Calinski and Harabasz Index. These results can be used as a guide for choosing cluster number.


smmueller/plotdesignr documentation built on Jan. 5, 2022, 10:55 a.m.