rsample

Classes and functions to create and summarize resampling objects

https://github.com/tidymodels/rsample

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    6 of 47 committers (12.8%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.7%) to scientific vocabulary

Keywords from Contributors

tidy-data setup tidyverse data-manipulation grammar parsing fwf csv unit-testing visualisation
Last synced: 10 months ago · JSON representation

Repository

Classes and functions to create and summarize resampling objects

Basic Info
Statistics
  • Stars: 341
  • Watchers: 20
  • Forks: 65
  • Open Issues: 34
  • Releases: 14
Created about 9 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners

README.Rmd

---
output: github_document
editor_options: 
  chunk_output_type: console
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# rsample a boot on a green background


[![R-CMD-check](https://github.com/tidymodels/rsample/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/rsample/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/tidymodels/rsample/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/rsample)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/rsample)](https://cran.r-project.org/package=rsample)
[![Downloads](https://cranlogs.r-pkg.org/badges/rsample)](https://cran.r-project.org/package=rsample)
[![lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html)



## Overview

The rsample package provides functions to create different types of resamples and corresponding classes for their analysis. 
The goal is to have a modular set of methods that can be used for:
 
 * resampling for estimating the sampling distribution of a statistic
 * estimating model performance using a holdout set
 
The scope of rsample is to provide the basic building blocks for creating and analyzing resamples of a data set, but this package does not include code for modeling or calculating statistics. The [Working with Resample Sets](https://rsample.tidymodels.org/articles/Working_with_rsets.html) vignette gives a demonstration of how rsample tools can be used when building models.  

Note that resampled data sets created by rsample are directly accessible in a resampling object but do not contain much overhead in memory. Since the original data is not modified, R does not make an automatic copy. 
 
For example, creating 50 bootstraps of a data set does not create an object that is 50-fold larger in memory:

``` r
library(rsample)
library(mlbench)

data(LetterRecognition)
lobstr::obj_size(LetterRecognition)
#> 2,644,640 B

set.seed(35222)
boots <- bootstraps(LetterRecognition, times = 50)
lobstr::obj_size(boots)
#> 6,686,776 B

# Object size per resample
lobstr::obj_size(boots)/nrow(boots)
#> 133,735.5 B

# Fold increase is <<< 50
as.numeric(lobstr::obj_size(boots)/lobstr::obj_size(LetterRecognition))
#> [1] 2.528426
```

Created on 2022-02-28 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1)

The memory usage for 50 bootstrap samples is less than 3-fold more than the original data set. 


## Installation

To install it, use:

```{r install, eval = FALSE}
install.packages("rsample")
```

And the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("pak")
pak::pak("rsample")
```

## Contributing

This project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

- For questions and discussions about tidymodels packages, modeling, and machine learning, please [post on Posit Community](https://forum.posit.co/new-topic?category_id=15&tags=tidymodels,question).

- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/rsample/issues).

- Either way, learn how to create and share a [reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html) (a minimal, reproducible example), to clearly communicate about your code.

- Check out further details on [contributing guidelines for tidymodels packages](https://www.tidymodels.org/contribute/) and [how to get help](https://www.tidymodels.org/help/).


Owner

  • Name: tidymodels
  • Login: tidymodels
  • Kind: organization

GitHub Events

Total
  • Create event: 14
  • Release event: 1
  • Issues event: 21
  • Watch event: 3
  • Delete event: 8
  • Issue comment event: 15
  • Push event: 34
  • Pull request review event: 10
  • Pull request review comment event: 14
  • Pull request event: 25
  • Fork event: 1
Last Year
  • Create event: 14
  • Release event: 1
  • Issues event: 21
  • Watch event: 3
  • Delete event: 8
  • Issue comment event: 15
  • Push event: 34
  • Pull request review event: 10
  • Pull request review comment event: 14
  • Pull request event: 25
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 826
  • Total Committers: 47
  • Avg Commits per committer: 17.574
  • Development Distribution Score (DDS): 0.715
Past Year
  • Commits: 201
  • Committers: 12
  • Avg Commits per committer: 16.75
  • Development Distribution Score (DDS): 0.214
Top Committers
Name Email Commits
Hannah Frick h****h@p****o 235
Max Kuhn m****n@g****m 233
DavisVaughan d****s@r****m 85
Julia Silge j****e@g****m 75
fbchow f****w@g****m 47
Michael Mahoney m****8@g****m 36
Priyata Kalra p****a@g****m 13
jyuu j****1@n****u 13
Demetri Pananos d****s@g****m 12
Clayton Yochum c****y@g****m 7
Matthew T. Warkentin m****n@m****a 5
DavisVaughan m****5@u****u 5
Emil Hvitfeldt e****t@g****m 5
‘topepo’ ‘****n@g****’ 4
James Wade j****e@d****m 4
Matt Dancho m****o@g****m 4
agmurray a****y@v****u 4
nmercadeb n****7@g****m 3
Simon P. Couch s****h@g****m 3
seb09 s****s@g****t 2
Mara Averick m****k@g****m 2
ccani007 c****7@f****u 2
Nikolai Vogl n****0@w****e 2
Max Kuhn m****x@i****l 2
Liam Blake 3****e 1
Lluís Ramon l****n@g****m 1
Matthew T. Warkentin w****n@l****a 1
Michael Chirico m****4@g****m 1
Tim Trice t****e@g****m 1
Z_Wael z****s@g****m 1
and 17 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 122
  • Total pull requests: 131
  • Average time to close issues: 4 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 40
  • Total pull request authors: 20
  • Average comments per issue: 2.05
  • Average comments per pull request: 1.42
  • Merged pull requests: 122
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 24
  • Pull requests: 34
  • Average time to close issues: 4 months
  • Average time to close pull requests: 1 day
  • Issue authors: 9
  • Pull request authors: 1
  • Average comments per issue: 0.83
  • Average comments per pull request: 0.44
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • hfrick (56)
  • topepo (12)
  • mikemahoney218 (10)
  • simonpcouch (3)
  • EmilHvitfeldt (3)
  • juliasilge (3)
  • sametsoekel (2)
  • mattwarkentin (1)
  • jrosell (1)
  • mkiang (1)
  • nick-youngblut (1)
  • kenraywilliams (1)
  • gregor-fausto (1)
  • MasterLuke84 (1)
  • zz77zz (1)
Pull Request Authors
  • hfrick (101)
  • mikemahoney218 (18)
  • PriKalra (10)
  • topepo (5)
  • Dpananos (5)
  • seb09 (4)
  • simonpcouch (4)
  • EmilHvitfeldt (3)
  • brshallo (2)
  • juliasilge (2)
  • DavisVaughan (2)
  • agmurray (2)
  • JamesHWade (2)
  • ccani007 (2)
  • laurabrianna (2)
Top Labels
Issue Labels
feature (34) tidy-dev-day :nerd_face: (19) upkeep (12) documentation (11) bug (3) discussion (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 59,543 last-month
  • Total docker downloads: 33,531,462
  • Total dependent packages: 72
    (may contain duplicates)
  • Total dependent repositories: 145
    (may contain duplicates)
  • Total versions: 42
  • Total maintainers: 1
cran.r-project.org: rsample

General Resampling Infrastructure

  • Versions: 18
  • Dependent Packages: 62
  • Dependent Repositories: 144
  • Downloads: 59,543 Last month
  • Docker Downloads: 33,531,462
Rankings
Downloads: 1.1%
Stargazers count: 1.2%
Forks count: 1.3%
Dependent packages count: 1.5%
Dependent repos count: 1.7%
Average: 4.0%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 10 months ago
proxy.golang.org: github.com/tidymodels/rsample
  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 10 months ago
conda-forge.org: r-rsample
  • Versions: 11
  • Dependent Packages: 10
  • Dependent Repositories: 1
Rankings
Dependent packages count: 5.9%
Average: 19.1%
Stargazers count: 22.0%
Dependent repos count: 24.2%
Forks count: 24.3%
Last synced: 10 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4 depends
  • dplyr >= 1.0.0 imports
  • ellipsis * imports
  • furrr * imports
  • generics * imports
  • glue * imports
  • methods * imports
  • pillar * imports
  • purrr * imports
  • rlang >= 0.4.10 imports
  • slider >= 0.1.5 imports
  • tibble * imports
  • tidyr * imports
  • tidyselect * imports
  • vctrs >= 0.3.0 imports
  • broom * suggests
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • modeldata * suggests
  • recipes >= 0.1.4 suggests
  • rmarkdown * suggests
  • stats * suggests
  • testthat >= 3.0.0 suggests
  • utils * suggests
  • whisker * suggests
  • withr * suggests
  • xml2 * suggests
.github/workflows/R-CMD-check-hard.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lock.yaml actions
  • dessant/lock-threads v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pr-commands.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/pr-fetch v2 composite
  • r-lib/actions/pr-push v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite