Learn R Programming

fastml: Fast Machine Learning Model Training and Evaluation

fastml is a streamlined R package designed to simplify the training, evaluation, and comparison of multiple machine learning models. It offers comprehensive data preprocessing, supports a wide range of algorithms with hyperparameter tuning, and provides performance metrics alongside visualization tools to facilitate efficient and effective machine learning workflows.

Features

  • Comprehensive Data Preprocessing: Handle missing values, encode categorical variables, and apply various scaling methods with minimal code.
  • Support for Multiple Algorithms: Train a wide array of machine learning models including XGBoost, Random Forest, SVMs, KNN, Neural Networks, and more.
  • Hyperparameter Tuning: Customize and automate hyperparameter tuning for each algorithm to optimize model performance.
  • Performance Evaluation: Evaluate models using metrics like Accuracy, Kappa, Sensitivity, Specificity, Precision, F1 Score, and ROC AUC.
  • Visualization Tools: Generate comparison plots to visualize and compare the performance of different models effortlessly.
  • Easy Integration: Designed to integrate seamlessly into your existing R workflows with intuitive function interfaces.

Installation

From CRAN

You can install the latest stable version of fastml from CRAN using:

install.packages("fastml")

From GitHub

For the development version, install directly from GitHub using the devtools package:

# Install devtools if you haven't already
install.packages("devtools")

# Install fastml from GitHub
devtools::install_github("selcukorkmaz/fastml")

Quick Start

Here's a simple workflow to get you started with fastml:

library(fastml)

# Example dataset
data(iris)
iris <- iris[iris$Species != "setosa", ]  # Binary classification
iris$Species <- factor(iris$Species)

# Train models
model <- fastml(
  data = iris,
  label = "Species"
)

# View model summary
summary(model)

Copy Link

Version

Install

install.packages('fastml')

Monthly Downloads

237

Version

0.6.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Selcuk Korkmaz

Last Published

June 10th, 2025

Functions in fastml (0.6.1)

train_models

Train Specified Machine Learning Algorithms on the Training Data
load_model

Load Model Function
save.fastml

Save Model Function
summary.fastml

Summary Function for fastml (Using yardstick for ROC Curves)
get_best_workflows

Get Best Workflows
fastexplain

FastExplain the fastml (DALEX + SHAP + Permutation-based VI)
evaluate_models

Evaluate Models Function
get_best_model_idx

Get Best Model Indices by Metric and Group
get_best_model_names

Get Best Model Names
flatten_and_rename_models

Flatten and Rename Models
framingham

Framingham Heart Study Data
fastml

Fast Machine Learning Function
fastexplore

Explore and Summarize a Dataset Quickly
availableMethods

Get Available Methods
get_model_engine_names

Get Model Engine Names
process_model

Process Model and Compute Performance Metrics
get_default_tune_params

Get Default Tuning Parameters
get_engine_names

Get Engine Names from Model Workflows
predict.fastml

Predict method for fastml objects
get_default_engine

Get Default Engine
get_default_params

Get Default Parameters for an Algorithm
plot.fastml

Plot Methods for fastml Objects
sanitize

Clean Column Names or Character Vectors by Removing Special Characters