Movatterモバイル変換


[0]ホーム

URL:


fastml:Fast Machine Learning Model Training and Evaluation

fastml is a streamlined R package designed tosimplify the training, evaluation, and comparison of multiple machinelearning models. It offers comprehensive data preprocessing, supports awide range of algorithms with hyperparameter tuning, and providesperformance metrics alongside visualization tools to facilitateefficient and effective machine learning workflows.

Features

Installation

From CRAN

You can install the latest stable version offastmlfrom CRAN using:

install.packages("fastml")

You can install all dependencies (additional models) using:

# install all dependencies - recommendedinstall.packages("fastml",dependencies =TRUE)

From GitHub

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

# Install devtools if you haven't alreadyinstall.packages("devtools")# Install fastml from GitHubdevtools::install_github("selcukorkmaz/fastml")

Quick Start

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

library(fastml)# Example datasetdata(iris)iris<- iris[iris$Species!="setosa", ]# Binary classificationiris$Species<-factor(iris$Species)# Train modelsmodel<-fastml(data = iris,label ="Species")# View model summarysummary(model)

Tuning Strategies

fastml supports both grid search and Bayesian optimization throughthetuning_strategy argument. Use"grid" for aregular parameter grid or"bayes" for Bayesianhyperparameter search. Thetuning_iterations parametercontrols the number of iterationsonly whentuning_strategy = "bayes" and is ignored otherwise.

Explainability

fastexplain() provides several ways to understandtrained models. Set themethod argument to choose anapproach:

# LIME explanationsexplain_lime(model)# ICE curvesfastexplain(model,method ="ice",features ="Sepal.Length")# Accumulated Local Effectsfastexplain(model,method ="ale",features ="Sepal.Length")# Surrogate treefastexplain(model,method ="surrogate")# Interaction strengthfastexplain(model,method ="interaction")# Counterfactual explanation for a single observationfastexplain(model,method ="counterfactual",observation = iris[1, ])

[8]ページ先頭

©2009-2025 Movatter.jp