Visualization in parallelels coordinates in matrix of each attribute
Visualization of the classes corresponding to each neuron of the SOM
geom_class(object_som, class = NULL, x_o = 3, y_o = 5.5, x_e = 3, y_e = 6.3)
object_som
: object of Kohonen packageclass
: categorical vector corresponding to the class of the datasetx_o
: x-axis to map the number of observations of each neurony_o
: y-axis to map the number of observations of each neuronx_e
: x-axis to map the entropy of each neurony_e
: y-axis to map the entropy of each neuronggplot2 object
# Creating SOM object iris_som <- kohonen::som(X = as.matrix(iris[1:4]), grid = kohonen::somgrid(xdim = 5, ydim = 5, neighbourhood.fct = "gaussian", topo = "rectangular"), rlen = 100) # Creating ggsom class plot geom_class(iris_som, class = iris$Species, x_o = 1, y_o = 6, x_e = 1.1, y_e = 7.4)
ggplot2
package (https://CRAN.R-project.org/package=ggplot2)
Felipe Carvalho, lipecaso@gmail.com