Learn R Programming

popsom (version 6.0)

map.significance: Compute Significance of Features

Description

Computes the relative significance of each feature and plots it.

Usage

map.significance(map,graphics=TRUE,feature.labels=TRUE)

Arguments

map

An object of type 'map'.

graphics

A switch that controls whether a plot is generated or not.

feature.labels

A switch to allow the plotting of feature names vs feature indices.

Value

If graphics=FALSE a vector containing the significance for each feature is returned.

References

Bayesian Probability Approach to Feature Significance for Infrared Spectra of Bacteria, Lutz Hamel, Chris W. Brown, Applied Spectroscopy, Volume 66, Number 1, 2012.

Examples

Run this code
# NOT RUN {
data(iris)

df <- subset(iris,select=-Species)
labels <- subset(iris,select=Species)

m <- map.build(df,labels,xdim=15,ydim=10,train=10000)

## show the relative feature significance for each feature
df <- data.frame(names(df),map.significance(m,graphics=FALSE))
names(df) <- c("Features","Significance")
df

## display the relative feature significance graphically
map.significance(m)
# }

Run the code above in your browser using DataLab