Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hendersontrent/correctr
R package for computing corrected test statistics for comparing machine learning models on correlated samples
https://github.com/hendersontrent/correctr
hypothesis-testing machine-learning statistics
Last synced: 10 days ago
JSON representation
R package for computing corrected test statistics for comparing machine learning models on correlated samples
- Host: GitHub
- URL: https://github.com/hendersontrent/correctr
- Owner: hendersontrent
- License: other
- Created: 2022-12-15T14:37:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-13T22:27:37.000Z (8 months ago)
- Last Synced: 2024-03-14T13:10:46.177Z (8 months ago)
- Topics: hypothesis-testing, machine-learning, statistics
- Language: R
- Homepage: https://hendersontrent.github.io/correctR/
- Size: 8.26 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: rmarkdown::github_document
---# correctR
[![CRAN version](https://www.r-pkg.org/badges/version/correctR)](https://www.r-pkg.org/pkg/correctR)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/correctR)](https://www.r-pkg.org/pkg/correctR)
[![DOI](https://zenodo.org/badge/578642033.svg)](https://zenodo.org/badge/latestdoi/578642033)Corrected test statistics for comparing machine learning models on correlated samples
```{r, include = FALSE}
knitr::opts_chunk$set(
comment = NA, fig.width = 8, fig.height = 8, cache = FALSE)
```## Installation
You can install the stable version of `correctR` from CRAN:
```{r eval = FALSE}
install.packages("correctR")
```You can install the development version of `correctR` from GitHub:
```{r eval = FALSE}
devtools::install_github("hendersontrent/theft")
```## General purpose
Often in machine learning, we want to compare the performance of different models to determine if one statistically outperforms another. However, the methods used (e.g., data resampling, $k$-fold cross-validation) to obtain these performance metrics (e.g., classification accuracy) violate the assumptions of traditional statistical tests such as a $t$-test. The purpose of these methods is to either aid generalisability of findings (i.e., through quantification of error as they produce multiple values for each model instead of just one) or to optimise model hyperparameters. This makes them invaluable, but unusable with traditional tests, as [Dietterich (1998)](https://pubmed.ncbi.nlm.nih.gov/9744903/) found that the standard $t$-test underestimates the variance, therefore driving a high Type I error. `correctR` is a lightweight package that implements a small number of corrected test statistics for cases when samples are not independent (and therefore are correlated), such as in the case of resampling, $k$-fold cross-validation, and repeated $k$-fold cross-validation. These corrections were all originally proposed by [Nadeau and Bengio (2003)](https://link.springer.com/article/10.1023/A:1024068626366). Currently, only cases where two models are to be compared are supported.
## Python version
A Python version of `correctR` called `correctipy` is available at the [GitHub repository](https://github.com/hendersontrent/correctipy).