Skip to content

1. Home

Steven Paul Sanderson II, MPH edited this page Nov 16, 2023 · 2 revisions

Welcome to the {tidyAML} wiki!

Introduction

Welcome to {tidyAML} which is a new R package that makes it easy to use the {tidymodels} ecosystem to perform automated machine learning (AutoML). This package provides a simple and intuitive interface that allows users to quickly generate machine learning models without worrying about the underlying details. It also includes a safety mechanism that ensures that the package will fail gracefully if any required extension packages are not installed on the user’s machine. With {tidyAML}, users can easily build high-quality machine learning models in just a few lines of code. Whether you are a beginner or an experienced machine learning practitioner, {tidyAML} has something to offer.

Some ideas are that we should be able to generate regression models on the fly without having to actually go through the process of building the specification, especially if it is a non-tuning model, meaning we are not planing on tuning hyper-parameters like penalty and cost.

The idea is not to re-write the excellent work the {tidymodels} team has done (because it’s not possible) but rather to try and make an enhanced easy to use set of functions that do what they say and can generate many models and predictions at once.

This is similar to the great h2o package, but, {tidyAML} does not require java to be setup properly like h2o because {tidyAML} is built on {tidymodels}.

Installation

You can install the {tidyAML} package in one of two ways, it is both published on CRAN and here on GitHub.

From CRAN:

install.packages("tidyAML")

From GitHub:

if (!require(devtools)){install.packages("devtools"))
devtools::install_github("spsanderson/tidyAML")

Foundations

The foundations of this package besides {tidymodels} are the two following functions:

  • internal_make_spc_tbl() which feeds the following two:
  • fast_classification_parsnip_spec_tbl()
  • fast_regression_parsnip_spec_tbl()

These two functions in their present state house the ability to create model specifications.

The code for internal_make_spec_tbl() is here so it would be good to get familiar with that function along with the aforementioned.

fast_classification_parsnip_spec_tbl()

fast_regression_parsnip_spec_tbl()

Vision

All parsnip supported engines and the parsnip extensions should be supported by {tidyAML} This will take effort. Right now, there is a single function that creates the model specifications using the purrr library. It might be necessary that separate functions be created for all models if future models not already supported here necessitate that. The goal is to keep the code homogeneous, so any like function/method should be written exactly the same.

Maybe at this point in time, as the project currently stands, it is better to think of this package as a model generator, the reason for this is that as of yet, the tuning mechanism is not working, that is in part due to the flaws of the model generation.