rules

parsnip extension for rule-based models

https://github.com/tidymodels/rules

Science Score: 26.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
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.6%) to scientific vocabulary

Keywords from Contributors

tidy-data tidyverse setup
Last synced: 10 months ago · JSON representation

Repository

parsnip extension for rule-based models

Basic Info
Statistics
  • Stars: 40
  • Watchers: 5
  • Forks: 4
  • Open Issues: 1
  • Releases: 10
Created over 6 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct Support

README.Rmd

---
output: github_document
---



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

# rules


[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![R-CMD-check](https://github.com/tidymodels/rules/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tidymodels/rules/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/tidymodels/rules/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tidymodels/rules?branch=main)
[![CRAN status](https://www.r-pkg.org/badges/version/rules)](https://cran.r-project.org/package=rules)


## Introduction

rules is a [parsnip](https://parsnip.tidymodels.org/) extension package with model definitions for rule-based models, including:

 * cubist models that have discrete rule sets that contain linear models with an ensemble method similar to boosting
 * classification rules where a ruleset is derived from an initial tree fit
 * _rule-fit_ models that begin with rules extracted from a tree ensemble which are then added to a regularized linear or logistic regression. 

## Installation

You can install the released version of rules from [CRAN](https://CRAN.R-project.org) with:

``` r
install.packages("rules")
```

Install the development version from GitHub with:

``` r
# install.packages("pak")
pak::pak("tidymodels/rules")
```

## Available Engines

The rules package provides engines for the models in the following table.

```{r}
#| echo: false
#| message: false
library(parsnip)

parsnip_models <- setNames(nm = get_from_env("models")) |>
  purrr::map_dfr(get_from_env, .id = "model")

library(rules)

rules_models <- setNames(nm = get_from_env("models")) |>
  purrr::map_dfr(get_from_env, .id = "model")

dplyr::anti_join(
  rules_models, parsnip_models, 
  by = c("model", "engine", "mode")
) |>
  knitr::kable()
```

## Contributing

This project is released with a [Contributor Code of Conduct](https://www.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 RStudio Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).

- If you think you have encountered a bug, please [submit an issue](https://github.com/tidymodels/rules/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
  • Issues event: 4
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 7
  • Pull request event: 4
  • Create event: 2
Last Year
  • Issues event: 4
  • Watch event: 1
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 7
  • Pull request event: 4
  • Create event: 2

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 193
  • Total Committers: 7
  • Avg Commits per committer: 27.571
  • Development Distribution Score (DDS): 0.389
Past Year
  • Commits: 4
  • Committers: 4
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.75
Top Committers
Name Email Commits
Max Kuhn m****n@g****m 118
Emil Hvitfeldt e****t@g****m 45
simonpcouch s****h@g****m 16
Julia Silge j****e@g****m 10
Hannah Frick h****h@r****m 2
Jared Lander i****o@j****m 1
Gábor Csárdi c****r@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 34
  • Total pull requests: 61
  • Average time to close issues: 3 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 14
  • Total pull request authors: 9
  • Average comments per issue: 2.09
  • Average comments per pull request: 1.07
  • Merged pull requests: 58
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 4
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Issue authors: 3
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • EmilHvitfeldt (10)
  • topepo (9)
  • vidarsumo (2)
  • frequena (2)
  • gglee4ai (2)
  • simonpcouch (1)
  • jennybc (1)
  • shuckle16 (1)
  • andrestyle16 (1)
  • DesmondChoy (1)
  • williamshell (1)
  • juliasilge (1)
  • saadaslam (1)
  • wdkeyzer (1)
Pull Request Authors
  • topepo (21)
  • EmilHvitfeldt (20)
  • simonpcouch (8)
  • juliasilge (5)
  • gaborcsardi (2)
  • hfrick (2)
  • alvindev0 (1)
  • jonthegeek (1)
  • jaredlander (1)
Top Labels
Issue Labels
upkeep (5) feature (3) bug (2) documentation (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 958 last-month
  • Total docker downloads: 21,621
  • Total dependent packages: 4
  • Total dependent repositories: 15
  • Total versions: 10
  • Total maintainers: 1
cran.r-project.org: rules

Model Wrappers for Rule-Based Models

  • Versions: 10
  • Dependent Packages: 4
  • Dependent Repositories: 15
  • Downloads: 958 Last month
  • Docker Downloads: 21,621
Rankings
Dependent repos count: 7.4%
Stargazers count: 8.1%
Forks count: 14.2%
Average: 15.5%
Downloads: 18.0%
Dependent packages count: 18.1%
Docker downloads count: 27.4%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4 depends
  • parsnip >= 0.2.1.9003 depends
  • dials >= 0.1.1.9001 imports
  • dplyr * imports
  • generics >= 0.1.0 imports
  • purrr * imports
  • rlang * imports
  • stringr * imports
  • tibble * imports
  • tidyr * imports
  • C50 * suggests
  • Cubist * suggests
  • covr * suggests
  • knitr * suggests
  • modeldata * suggests
  • recipes * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests
  • xrf >= 0.2.0 suggests
.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
.github/workflows/R-CMD-check-hard.yaml actions
  • actions/checkout v4 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