An R package containing functions I've written while working on predictive modeling projects. The functions are briefly described below, but documented in more detail in the function-specific help (.rd) files. All content can be downloaded/installed and then used like any other package after following the installation instructions below.
Install via devtools
straight from GitHub:
install.packages("devtools")
library("devtools")
install_github("etlundquist/eRic")
Download the tarball eRic_0.0.0.9000.tar.gz
and install from source:
install.packages('/path/to/tarball/eRic_0.0.0.9000.tar.gz', repos = NULL)
Bagged Lasso
evThreshold - calculate an optimal probability threshold for classification given the costs/benefits for each confusion matrix cell
provides an estimate of unit expected value given your model and the optimal probability cutoff
varCluster - cluster predictor variables and extract cluster summaries for dimension reduction
produce a correlation plot to visualize correlation structure in predictor matrix
plotYXbin - produces a ggplot object with bin values of Y with respect to bins of X
Additionally calculates Information Value (IV) and Chi2 Statistic for the XY relationship
prCalibrate - perform Platt Scaling on raw model predicted probabilities to better align with actual class proportions and produce a calibration plot to visualize results
produce a calibration plot showing the relationship between actual and predicted class proportions
plotKS - produces a ggplot object with a KS plot for two distributions as well as the KS statistic value
tsSummary - calculate summary statistics (using passed summary functions) with respect to wide-format time series variables
tsTrends - calculate linear trends with respect to wide-format time series variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.