geom_class: Visualization in parallelels coordinates in matrix of each...

Description Usage Arguments Value Author(s) References Examples

View source: R/ggsom_plot.R

Description

Visualization of the classes corresponding to each neuron of the SOM

Usage

1
geom_class(object_som, class = NULL, x_o = 3, y_o = 5.5, x_e = 3, y_e = 6.3)

Arguments

object_som

object of Kohonen package

class

categorical vector corresponding to the class of the dataset

x_o

x-axis to map the number of observations of each neuron

y_o

y-axis to map the number of observations of each neuron

x_e

x-axis to map the entropy of each neuron

y_e

y-axis to map the entropy of each neuron

Value

ggplot2 object

Author(s)

Felipe Carvalho, lipecaso@gmail.com

References

'ggplot2' package (https://CRAN.R-project.org/package=ggplot2)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

ggsom documentation built on March 26, 2020, 6:30 p.m.

Related to geom_class in ggsom...