Package 'ggsom'

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

Help Index


Visualization in parallelels coordinates in matrix of each attribute

Description

Visualization of the classes corresponding to each neuron of the SOM

Usage

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, [email protected]

References

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

Examples

# 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

Description

The aim of this package is to offer more variability of graphics based on the self-organizing maps


kohonen package object modeling

Description

Function to map each SOM neuron with its corresponding class

Usage

ggsom_aes(object_som, class)

Arguments

object_som

object of kohonen package

class

categorical vector corresponding to the class of the dataset

Value

data.table model used in visualizations

Author(s)

Felipe Carvalho, [email protected]

References

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


Function to obtain the purity of each neuron in the SOM network

Description

Entropy calculation using the maximum likelihood method

Usage

ggsom_entropy(ggsom_aes)

Arguments

ggsom_aes

kohonen package object modeling

Value

Data set with the purity attribute added in Tibble

Author(s)

Felipe Carvalho, [email protected]


verifies that the object inherits kohonen object

Description

if object inherits kohonen class return TRUE otherwise FALSE

Usage

is.kohonen(object_som)

Arguments

object_som

object of Kohonen package

Value

Boolean value

Author(s)

Felipe Carvalho, [email protected]

References

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