The R package classifast
is a side project that my friends Manuel, David and I are starting. Basically, the main goal is to make a function that, given multivariate labeled data, gives you a quick overview of which classifiers are the best for your problem (based on several accuracy criterious). Afterwards, the predict.classifast()
method lets you predict using several techniques such as Stacking, weighted voting, etc.
This minimal package is intended to be a project to both enhance our R skills and to make (hopefully) a usefull tool for Data Scientists. All help and feedback will be highly appreciated, so feel free to contact me on richyrecarey@gmail.com to get involved in the project.
install.packages(devtools)
devtools::install_github("Richyrecarey/classifast")
Given multivariate data in a matrix-like objet x
(rows are observations, columns are variables) and its correct labels in a vector-like object y
, the main function classifast(x, y, method)
will train the desired statistical classifiers selected in the string vector method
. Several options are:
method = "log"
: It will train binary or multinomial logistic regression, as needed. method = "svm"
: It will train Radial SVM. method = "knn"
: It will train the knn algorithm. method = "RandomForest"
: It will train Random Forest. method = "simple"
: It's the same as method = c("log", "svm", "knn", "RandomForest)
All the options and parameters available to tweak are available at help(classifast)
.
Once trained, classifast()
will return an object of class classifast
, which has several implemented methods/functions:
# Train several classifiers on the Iris dataset
output <- classifast(x = iris[-5], y = iris[5], method = "simple")
# Show retults of chosen methods
summary(output)
And the output should look somehow like this:
k-fold accuracy was approximated using 10-fold validation
Accuracy (%) of the diferent methods used:
Method kf % Test % Train %
1 log 96.66 92.45 100
2 svm 65.92 62.54 99.7
3 knn 75.51 72.54 94.3
4 RandomForest 84.72 82.54 92.4
Still developing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.