View source: R/plot_2d_scaling.R
plot_2d_scaling | R Documentation |
plot_2d_scaling
represents a 2-dimensional scaling plane starting from
a dissimilarity matrix.
plot_2d_scaling(distance_matrix, cluster_labels = NULL, title = "")
distance_matrix |
A distance matrix. |
cluster_labels |
The labels associated with the elements involving the
entries in |
title |
The title of the graph (default is no title). |
Given a distance matrix, the function constructs the corresponding 2-dimensional
scaling, which is a 2d plane in which the distances between the points represent
the original distances as correctly as possible. If the vector cluster_labels
is provided to the function, points in the 2d plane are coloured according to the
given class labels.
The 2-dimensional scaling plane.
Ángel López-Oriona, José A. Vilar
distance_matrix_qcd <- dis_qcd(SyntheticData1$data[1 : 30]) # Computing the pairwise
# distance matrix for the first 30 elements in dataset SyntheticData1 based on dis_qcd
plot_2d_scaling(distance_matrix_qcd, cluster_labels = SyntheticData1$classes[1 : 30])
# Constructing the corresponding 2d-scaling plot. Each class is represented
# in a different colour
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.