This function tunes the hyper-parameters the threshold and the k of k-NN
tuning(x, ...)# S3 method for formula
tuning(formula, data, ...)
# S3 method for default
tuning(
x,
knn_k = seq(3, 7, 2),
classColumn = 1,
boxplot_range = seq(0.1, 1.1, 0.2),
repeats = 10,
method = "svm",
iForest = TRUE,
threads = 1,
...
)
Optional parameters to be passed to other methods.
a formula describing the classification variable and the attributes to be used.
data frame containing the tranining dataset to be filtered.
range of the total number of nearest neighbors to be used.The default is 3:5.
positive integer indicating the column which contains the (factor of) classes. By default, a dataframe built from 'data' using the variables indicated in 'formula' and The first column is the response variable, thus no need to define the classColumn.
range of box and whisker diagram. The default is seq(0.8,1.2,0.1).
the number of cross-validation. The default is 10.
the classifier to be used to compute the accuracy. The valid methods are svm (default) and c50.
compute iForest score or not. The dafault is TRUE.
the number of cores to be used in parallel
An object of class filter, which is a list with two components:
summary is the a vector of values when different hyper-parameter is set.
call contains the original call to the filter.
# NOT RUN {
data(iris)
out = tuning(Species~.,iris)
# }
Run the code above in your browser using DataLab