Learn R Programming

fdm2id (version 1.0.1)

plot.selection: Plot a feature selection

Description

Draws the score every variable obtained, the ones that were kept apart from the ones that were not. Only a selection made by ranking the variables (algorithm = "ranking") can be drawn this way: it is the only one that scores them one by one, where the other three score whole subsets.

Usage

# S3 method for selection
plot(x, horiz = TRUE, legendpos = "bottomright", ...)

Arguments

x

The selection (object of class selection-class, created by selectfeatures).

horiz

Whether the bars are drawn horizontally, which leaves room for long variable names.

legendpos

Position of the legend.

...

Other parameters, passed to barplot.

See Also

selectfeatures, selection-class, print.selection

Examples

Run this code
# \donttest{
require (datasets)
data (iris)
# How useful a random forest finds each variable, and the two it would keep
selection = selectfeatures (iris [, -5], iris [, 5], unieval = "randomforest", uninb = 2)
selection
plot (selection)
# }

Run the code above in your browser using DataLab