numberclust_clustree: Visualize clustering process with clustering tree

View source: R/FleetSegmentation.R

numberclust_clustreeR Documentation

Visualize clustering process with clustering tree

Description

This function creates a clustering tree with the clustree()-function from the eponymous package. It visualizes the clustering process by showing the splits of the clusters in a tree plot. This a very useful method for identifying major segmentations of big groups in the data and ultimately deciding on how many clusters to use.

Usage

numberclust_clustree(
  catchdata,
  max_clusternumber = ifelse(nrow(catchdata) <= 15, (nrow(catchdata) - 1), 15),
  distance = "jaccard",
  method = "average"
)

Arguments

catchdata

The transformed catchdata created with catchdata_transformation()

max_clusternumber

The maximum number of clusters to be expected. Defaults to 1 less than the number of ships in the catchdata-frame, up to a maximum of 15.

distance

The distance measure used. Defaults to modified (metric-converted) Bray-Curtis distance. CAUTION! The clustering approach for the fleet segmentation is designed to work with modified (metric-converted) Bray-Curtis distance and the average linkage method! Changing either of them is not advised!

method

The link function used. Defaults to average linkage. CAUTION! The clustering approach for the fleet segmentation is designed to work with modified (metric-converted) Bray-Curtis distance and the average linkage method! Changing either of them is not advised!

Examples

library(tidyverse)
data <- example_catchdata
stockdata <- assign_stocks(data=data)
catchdata <- catchdata_transformation(data = stockdata)
numberclust_clustree(catchdata = catchdata,max_clusternumber = 15)

ESulanke/FleetSegmentation documentation built on March 27, 2023, 10:13 p.m.