Package that integrates preprocessing algorithms for oversampling, instance/feature selection, normalization, discretization, space transformation, and outliers/missing values/noise cleaning.
You can install the latest smartdata stable release from CRAN with:
# This sets both CRAN and Bioconductor as repositories to resolve dependencies
setRepositories(ind = 1:2)
install.packages("smartdata")
and load it into an R session with:
smartdata
provides the following wrappers:
instance_selection
feature_selection
normalize
discretize
space_transformation
clean_outliers
impute_missing
clean_noise
To get the possible methods available for a certain wrapper, we can do:
To get information about the parameters available for a method:
which_options("instance_selection", "multiedit")
#> For more information do: ?class::multiedit
#> Parameters for multiedit are:
#> * k: Number of neighbors used in KNN
#> Default value: 1
#> * num_folds: Number of partitions the train set is split in
#> Default value: 3
#> * null_passes: Number of null passes to use in the algorithm
#> Default value: 5
First let’s load a bunch of datasets:
data(iris0, package = "imbalance")
data(ecoli1, package = "imbalance")
data(nhanes, package = "mice")
super_iris <- iris %>% instance_selection("multiedit", k = 3, num_folds = 2,
null_passes = 10, class_attr = "Species")