clustering_MDS: Multi-dimensional scaling (MDS) of the clustering

View source: R/FleetSegmentation.R

clustering_MDSR Documentation

Multi-dimensional scaling (MDS) of the clustering

Description

This is function creates an MDS of the clustering result. The MDS can be either 2-dimensional (which is the default setting), or 3-dimensional. 3-dimensional MDS are harder to interpret, but due to the nature of compositional catch data, 2-dimensional MDS often have a poor goodness of fit (GoF) and have to be treated with caution.

Usage

clustering_MDS(catchdata, clustering, dim = 2, GoF = T, distance = "jaccard")

Arguments

catchdata

The transformed catchdata created with catchdata_transformation()

clustering

The result of the clustering procedure, stored as a data frame.

dim

The dimensions of the MDS. Use '2' for a 2-dimensional, classic MDS and '3' for a 3-dimensional MDS.

GoF

Display goodness of fit in the MDS plot. Defaults to TRUE

distance

The distance measure used. Defaults to modified (metric conversion) Bray-Curtis distance 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!

Examples

data <- example_catchdata
stockdata <- assign_stocks(data=data)
catchdata <- catchdata_transformation(data = stockdata)
clustering <- segmentation_clustering(catchdata = catchdata,n_cluster = 6)
clustering_MDS(catchdata = catchdata,clustering = clustering, GoF=TRUE)
clustering_MDS(catchdata = catchdata,clustering = clustering,dim = 3)

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