Learn R Programming

easyml

A toolkit for easily building and evaluating machine learning models.

R tutorial: https://ccs-lab.github.io/easyml/

Installation

You can install the latest development version from github with:

if (packageVersion("devtools") < 1.6) {
  install.packages("devtools")
}
devtools::install_github("CCS-Lab/easyml", subdir = "R")

If you encounter a clear bug, please file a minimal reproducible example on github.

Examples

Load the easyml library:

library(easyml)

For a dataset with a continuous dependent variable:

data("prostate", package = "easyml")
results <- easy_glmnet(prostate, "lpsa")

For a dataset with a binary dependent variable:

data("cocaine_dependence", package = "easyml")
results <- easy_glmnet(cocaine_dependence, "diagnosis", 
                       family = "binomial", exclude_variables = c("subject", "age"), 
                       categorical_variables = c("male"))

Citation

A whitepaper for easyml is available at https://doi.org/10.1101/137240. If you find this code useful please cite us in your work:

@article {Hendricks137240,
    author = {Hendricks, Paul and Ahn, Woo-Young},
    title = {Easyml: Easily Build And Evaluate Machine Learning Models},
    year = {2017},
    doi = {10.1101/137240},
    publisher = {Cold Spring Harbor Labs Journals},
    URL = {http://biorxiv.org/content/early/2017/05/12/137240},
    journal = {bioRxiv}
}

References

Hendricks, P., & Ahn, W.-Y. (2017). Easyml: Easily Build And Evaluate Machine Learning Models. bioRxiv, 137240. http://doi.org/10.1101/137240

Copy Link

Version

Install

install.packages('easyml')

Monthly Downloads

2

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

WooYoung Ahn

Last Published

June 26th, 2017

Functions in easyml (0.1.0)

easy_deep_neural_network

Easily build and evaluate a deep neural network.
easy_glinternet

Easily build and evaluate a penalized regression model with interactions.
fit_model.easy_glinternet

Fit a penalized regression model with interactions.
fit_model.easy_glmnet

Fit a penalized regression model.
easy_random_forest

Easily build and evaluate a random forest regression model.
easy_support_vector_machine

Easily build and evaluate a support vector machine regression model.
extract_variable_importances.easy_random_forest

Extract variable importance scores from a random forest model.
fit_model

Fit model.
generate_model_performance

Generate measures of model performance for a model.
generate_predictions

Generate predictions for a model.
cocaine_dependence

Cocaine data.
correlation_test

Compute the matrix of p-value.
easyml

easyml: Easily build and evaluate machine learning models.
measure_correlation_score

Measure Pearsons Correlation Coefficient.
measure_mse_score

Measure mean squared error.
plot_model_performance_binomial_auc_score

Plot histogram of the area under the curve (AUC) metrics.
plot_model_performance_gaussian_correlation_score

Plot histogram of the correlation coefficient metrics.
extract_coefficients

Extract coefficients.
fit_model.easy_support_vector_machine

Fit a support vector machine regression model.
generate_coefficients

Generate coefficients for a model (if applicable).
plot_predictions_gaussian

Plot gaussian predictions.
easy_analysis

The core recipe of easyml.
easy_avNNet

Easily build and evaluate an average neural network model.
extract_coefficients.easy_glmnet

Extract coefficients from a penalized regression model.
extract_variable_importances

Extract variable importances.
generate_variable_importances

Generate variable importances for a model (if applicable).
measure_auc_score

Measure area under the curve.
measure_r2_score

Measure Coefficient of Determination (R^2 Score).
plot_coefficients_processed

Plot penalized regression coefficients.
plot_variable_importances_processed

Plot random forest variable importances scores.
predict_model

Predict model.
resample_fold_train_test_split

Sample with respect to an identification vector
resample_simple_train_test_split

Train test split.
set_independent_variables

Set independent variables.
easy_glmnet

Easily build and evaluate a penalized regression model.
easy_neural_network

Easily build and evaluate a neural network.
fit_model.easy_avNNet

Fit an average neural network model.
fit_model.easy_deep_neural_network

Fit a deep neural network model.
set_looper

Set looper.
plot_model_performance_histogram

Plot histogram of measures of model performance.
plot_predictions_binomial

Plot binomial predictions.
predict_model.easy_neural_network

Predict values for a neural network model.
predict_model.easy_random_forest

Predict values for a random forest regression model.
preprocess_scale

Preprocess data by scaling it.
process_coefficients

Process coefficients.
set_cores

Set cores.
set_dependent_variable

Set dependent variable.
predict_model.easy_support_vector_machine

Predict values for a support vector machine regression model.
preprocess_identity

Preprocess data by leaving it exactly the way it is.
reduce_cores

Reduce number of cores.
plot_roc_curve

Plot ROC Curve.
predict_model.easy_glinternet

Predict values for a penalized regression model with interactions.
predict_model.easy_glmnet

Predict values for a penalized regression model.
resample_stratified_class_train_test_split

Sample in equal proportion.
remove_variables

Remove variables from a dataset.
set_parallel

Set parallel.
set_plot_model_performance

Set plot model performance function.
fit_model.easy_neural_network

Fit a neural network model.
fit_model.easy_random_forest

Fit a random forest model.
plot_model_performance_gaussian_mse_score

Plot histogram of the mean squared error metrics.
plot_model_performance_gaussian_r2_score

Plot histogram of the coefficient of determination (R^2) metrics.
resample_stratified_simple_train_test_split

Sample in equal proportion.
set_categorical_variables

Set categorical variables.
set_column_names

Set column names.
set_plot_predictions

Set plot predictions function.
predict_model.easy_avNNet

Predict values for an average neural network model.
predict_model.easy_deep_neural_network

Predict values for a deep neural network model.
process_variable_importances

Process variable importances.
prostate

Prostate data.
set_looper_

Set looper.
set_measure

Set measure function.
set_random_state

Set random state.
set_resample

Set resample function.
set_preprocess

Set preprocess function.