Title: | ggsom |
---|---|
Description: | Tool for visualization of SOMs object. |
Authors: | Felipe Carvalho [aut, cre], Rafael Santos [ctb], Karine Reis [ctb] |
Maintainer: | Felipe Carvalho <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.4.0 |
Built: | 2025-01-07 03:29:52 UTC |
Source: | https://github.com/oldlipe/ggsom |
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)
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 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 |
ggplot2 object
Felipe Carvalho, [email protected]
'ggplot2' package (https://CRAN.R-project.org/package=ggplot2)
# 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)
# 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)
The aim of this package is to offer more variability of graphics based on the self-organizing maps
Function to map each SOM neuron with its corresponding class
ggsom_aes(object_som, class)
ggsom_aes(object_som, class)
object_som |
object of kohonen package |
class |
categorical vector corresponding to the class of the dataset |
data.table model used in visualizations
Felipe Carvalho, [email protected]
'Kohonen'package (https://CRAN.R-project.org/package=kohonen)
Entropy calculation using the maximum likelihood method
ggsom_entropy(ggsom_aes)
ggsom_entropy(ggsom_aes)
ggsom_aes |
kohonen package object modeling |
Data set with the purity attribute added in Tibble
Felipe Carvalho, [email protected]
if object inherits kohonen class return TRUE otherwise FALSE
is.kohonen(object_som)
is.kohonen(object_som)
object_som |
object of Kohonen package |
Boolean value
Felipe Carvalho, [email protected]
'Kohonen'package (https://CRAN.R-project.org/package=kohonen)