Type: Package
Title: New Data Visualisations for SOMs Networks
Version: 0.4.0
Description: The aim of this package is to offer more variability of graphics based on the self-organizing maps.
License: MIT + file LICENSE
LazyData: true
Encoding: UTF-8
Depends: R (≥ 3.4.0)
Imports: dplyr, magrittr, tidyr, ggplot2, kohonen, assertthat, data.table, entropy, tibble
Suggests: devtools, knitr, rmarkdown
URL: https://github.com/oldlipe/ggsom
RoxygenNote: 7.0.0
Collate: 'ggsom.R' 'ggsom_aes.R' 'ggsom_entropy.R' 'ggsom_plot.R' 'ggsom_utils.R' 'zzz.R'
NeedsCompilation: no
Packaged: 2020-01-15 20:21:31 UTC; felipe
Author: Felipe Carvalho [aut, cre], Rafael Santos [ctb], Karine Reis [ctb]
Maintainer: Felipe Carvalho <lipecaso@gmail.com>
Repository: CRAN
Date/Publication: 2020-01-15 20:40:02 UTC

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, lipecaso@gmail.com

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, lipecaso@gmail.com

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, felipe.carvalho@inpe.br


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, lipecaso@gmail.com

References

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