-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Readme with correct instructions
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
# BestModel | ||
An R Package to return and compare variety of different model types, complete with hyper-parameter tuning options | ||
|
||
Install by using `install_github("orionw/BestModel")` from the `devtools` library | ||
Install by using `install_github("orionw/BestModel")` after installing and loading the `devtools` library | ||
|
||
Publication in CRAN forthcoming | ||
|
||
Example usage: | ||
```R | ||
library(BestModel) | ||
# prepare the dataset. This function provided cleans the Titanic dataset. | ||
titanic <- PrepareTitanic() | ||
iris_data <- PrepareIris() | ||
|
||
# create the models. This includes SVM's, K-NN, A 4 layer Neural Network, and Linear or Logistic Regression. | ||
comp <- GetModelComparisons(titanic[, -1], titanic[, 1], model.list = "all") | ||
comp <- GetModelComparisons(iris_data[, -5], iris_data[, 5], model.list = "all") | ||
|
||
# get prediction values for the models | ||
preds = predict(comp, newdata = iris_data[, -5], type="prob") | ||
|
||
# Default. Plot AUC, Accuracy, Recall, and Precision | ||
plot(comp, titanic[, 1], titanic[, -1], plot.type=c("All")) | ||
plot(comp, iris_data[, 5], predictions=preds, plot.type=c("All")) | ||
|
||
# Choose specific metrics | ||
plot(comp, titanic[, 1], titanic[, -1], plot.type=c("Specificity", "Precision", "AUC", "Recall", "Detection Rate")) | ||
plot(comp, iris_data[, 5], predictions=preds, plot.type=c("Specificity", "Precision", "AUC", "Recall", "Detection Rate")) | ||
|
||
# plot overlapping ROC lines from all models | ||
plot(comp, titanic[, 1], titanic[, -1], plot.type="roc") | ||
plot(comp, iris_data[, 5], predictions=preds, plot.type="roc") | ||
|
||
``` |