My Coding >
Software >
R >
Cluster analysis >
Data Preparing for Cluster analysis in R
Data Preparing for Cluster analysis in RBefore clustering itself, we need to check dataset first. We need to check what this is (help()), how it is organised (glimpse()), any missed data (anyNA()) and also, if it is possible – visually check it, how it looks like (plot). Dataset inspectionWe will use internal, build it data set with iris species measurement iris
As we can see, this is a full dataset. Plotting 2D datasetsWe will use plot() to display our data
pch - give numbers if dot shapes and link them with variable Species, and bg - identify the colour of the selected dots.
As we can see – data are grouped into 3 different clusters and now we need to calculate it statistically. Preliminary analysis of the datasetsIt is a good idea to manually check unlabelled dataset, to see is there are any groupping patterns is present
This script will create table unlabeled_iris with removed species. So it will be anonymous dataset. And we will plot all possible pairs there.
Visual inspection of this pairs should give some ideas about possible clustering data for automatic learning.
|
Last 10 artitles
9 popular artitles
|
|||||
© 2020 MyCoding.uk -My blog about coding and further learning. This blog was writen with pure Perl and front-end output was performed with TemplateToolkit. |