predSortPlot: Devil's Horn

Description Usage Arguments Value See Also Examples

Description

Visualize results of supervised model predictions on test data. Currently supports binary target variable. Red dots represent observations where target variable = 1, black dots where target variable = 0.

Usage

1
predSortPlot(pred, ytest, jitterPlot = NULL)

Arguments

pred

vector of predictions for target variable on test data

ytest,

vector of the target variable from test data. (0s and 1s)

jitterPlot

TRUE or FALSE. Jitters points on plot when TRUE

Value

plot

See Also

predQuantile

Examples

1
2
3
4
## Setting up some data and building a basic model on training data.
mylogit <- glm(vs~drat+hp+mpg, family=binomial('logit'), data=mtcars[1:25,])
mtcarsTestPred <- predict(mylogit, mtcars[26:32, ], type='response')
predSortPlot(pred=mtcarsTestPred, ytest=mtcars$vs[26:32])

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.