forked from saraswatmks/superml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
67 lines (49 loc) · 1.73 KB
/
README.Rmd
File metadata and controls
67 lines (49 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# SuperML
The goal of SuperML is to provide sckit-learn's `fit`,`predict`,`transform` standard way of building
machine learning models in R. It is build on top of latest r-packages which provides optimized way of training machine learning models.
## Installation
You can install latest stable cran version using (recommended):
```{r, eval=FALSE}
install.packages("superml")
```
You can install latest development version from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("saraswatmks/superml")
```
## Description
In superml, every machine learning algorithm is called as a `trainer`. Following is the list of trainers available as of today:<br/>
* LMTrainer: used to train linear, logistic, ridge, lasso models
* KNNTrainer: K-Nearest Neighbour Models
* KMeansTrainer: KMeans Model
* NBTrainer: Naive Baiyes Model
* SVMTrainer: SVM Model
* RFTrainer: Random Forest Model
* XGBTrainer: XGBoost Model
In addition, there are other useful functions to support modeling tasks such as:
* CountVectorizer: Create Bag of Words model
* TfidfVectorizer: Create TF-IDF feature model
* LabelEncoder: Convert categorical features to numeric
* GridSearchCV: For hyperparameter optimization
* RandomSearchCV: For hyperparameter optimization
* kFoldMean: Target encoding (experimental)
* smoothMean: Target encoding with smoothing
## Usage
Any machine learning model can be trained using the following steps:
```{r example}
data(iris)
library(superml)
rf <- RFTrainer$new(n_estimators = 100)
rf$fit(iris, "Species")
pred <- rf$predict(iris)
```