plot.rfdata {rgnoisefilt} | R Documentation |
Plot function for class rfdata
Description
Graphical representation that allows for comparing data distributions before and after the noise filtering process.
Usage
## S3 method for class 'rfdata'
plot(x, ..., var = c(1), fun = "mean")
Arguments
x |
an object of |
... |
other options to pass to the function. |
var |
an integer vector with the indices of variables whose distributions are compared,
considering the attributes in the order in which they appear in the original data, with the output variable in the last position (default = |
fun |
a character containing the name of the descriptive statistic function to compute for each distribution of the variable,
or a user-defined function that returns a value from a distribution of numeric values (default: |
Details
This function generates a plot for each of the variables specified by the var
parameter,
allowing the comparison of their value distributions before filtering, using the descriptive statistic specified by fun
,
with the distributions of the data from samples identified as clean and noisy by the filtering method.
Value
An object of class ggplot
that graphically represents the data distributions before and after the noise filtering.
See Also
Examples
# load the dataset
data(rock)
# apply the regression noise filter
set.seed(9)
output <- regAENN(x = rock[,-ncol(rock)], y = rock[,ncol(rock)])
# comparison chart of data distributions before and after the filtering process
plot(x = output, var = c(1:4), fun = "mean")