plotPoliticalMap: Political Map of Gaussian Mixture Model

View source: R/plotPoliticalMap.R

plotPoliticalMapR Documentation

Political Map of Gaussian Mixture Model

Description

Draws a political map of the classification of a Gaussian Mixture Model.

Usage

plotPoliticalMap(Data, CurrGauss,Means, Covariances, Weights,
MainAxesAngle,Colors, Cls,Shapes, ShapeText, AxNames = c("X1", "X2"),
ShowAxis = FALSE, ShowEllipsoids = TRUE,
ShowScatter = FALSE, Source = "D")

Arguments

Data

[1:n, 1:2] Numeric matrix with n observations and 2 features.

CurrGauss

Integer indicating the current selected Gaussian component.

Means

List with l [1:2] numerical vector defining the means of the l GMM components.

Covariances

List with l [1:2, 1:2] numerical matrices defining the covariance matrices of the l GMM components.

Weights

[1:l] Numerical vector with weights for each GMM component.

MainAxesAngle

List of numeric vectors with 1st and 2nd main axes of a 2D ellipsoid and the respective angles measured to the first unit vector c(0,1).

Colors

[1:l] Character vector with l color names or more.

Cls

[1:n] Numeric vector with classification for n observations.

Shapes

List of List with 4 attributes (type, fillcolor, opacity, path) for a shape for plotting. Here it is used for plotting an ellipsoid.

ShapeText

[1:l, 1:3] Numeric matrix with l means and two entries for the two-dimensional coordinates and one entry for the number of the Gaussian component.

AxNames

[1:2] Character vector with ax names for plot description.

ShowAxis

Boolean indicating to show models axis or not.

ShowEllipsoids

Boolean indicating to show models ellipsoids or not.

ShowScatter

Boolean indicating if data scatter is shown or not.

Source

Character indicating plot source (Default = "D"). Important attribute for plotly in shiny in order to keep control of specific panels.

Value

plotOut

Plotly object containing plot for direct visualization.

Author(s)

Quirin Stier


Mthrun/AdaptGauss2D documentation built on July 19, 2022, 3:11 a.m.