Homework assignment No.6

  1. Choose two methods from Multidimensional data: direct methods
  2. Make visualizations
  3. Prepare presentation and upload.

Visualizations

First visualization. Radar plot.

The first visualization depicts the least similar object to object no. 3 according to the Euclidean distance metric.

x_1 <-  3
radarchart(as.data.frame(plot_data[c(1:2,(x_1+2),
                                     (which(dist_euc[x_1,] == max(dist_euc[x_1,-x_1]))+2)),]), 
           title = paste0("Euclidean distance = ",round(max(dist_euc[x_1,-x_1]),2),"\n The least similar object - ",which(dist_euc[x_1,] == max(dist_euc[x_1,-x_1]))))

Second visualization. Parallel Coordinate Plot.

The second visualization shows attribute values of ten of the most valued cargo along with the UnitType groups. The parallel coordinate plot simplifies the representation of attribute values.

ggparcoord(ndata,
           columns = c(1:3,5), groupColumn = 4,
           # scale="globalminmax",
           showPoints = TRUE, 
           title = "Attribute values of the ten most valued cargo",
           alphaLines = 1
) + 
  scale_color_discrete()

Also, to get a somewhat better representation of the variable dispersion between UnitType groups, a plot with all cargo is presented.

ggparcoord(nndata,
           columns = c(1:3,5), groupColumn = 4,
           # scale="globalminmax",
           showPoints = TRUE, 
           title = "Attribute values of cargo",
           alphaLines = 1
) + 
  scale_color_discrete()