-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
59 lines (44 loc) · 1.74 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
devtools::load_all() #todo
```
# tidyrules
<!-- badges: start -->
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/tidyrules)](https://cran.r-project.org/package=tidyrules)
<!-- badges: end -->
> [tidyrules](https://cran.r-project.org/package=tidyrules) [R](https://www.r-project.org/) [package](https://cran.r-project.org/) provides a framework to work with decision rules. Rules can be extracted from supported models, augmented with (custom) metrics using validation data, manipulated using standard dataframe operations, reordered and pruned based on a metric, predict on unseen (test) data. Utilities include; Creating a rulelist manually, Exporting a rulelist as a SQL case statement and so on. The package offers two classes; rulelist and ruleset based on dataframe.
**website**: https://talegari.github.io/tidyrules/
![](man/figures/tidyrules_schematic.png)
## Example
<details>
<summary>expand/collapse</summary>
```{r example}
library(tidyrules)
```
```{r basic C5 example}
model_c5 = C50::C5.0(Species ~ ., data = iris, rules = TRUE)
pander::pandoc.table(tidy(model_c5), split.tables = 120)
```
</details>
## Installation
<details>
<summary>expand/collapse</summary>
You can install the released version of tidyrules from [CRAN](https://CRAN.R-project.org) with:
```{r, eval = FALSE}
install.packages("tidyrules")
```
And the development version from [GitHub](https://github.com/) with:
```{r, eval = FALSE}
# install.packages("devtools")
devtools::install_github("talegari/tidyrules")
```
</details>