Skip to content

Commit

Permalink
Update Readme with correct instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
orionw authored Aug 1, 2019
1 parent 3226f9c commit c763107
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
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")

```

0 comments on commit c763107

Please sign in to comment.