Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thiyangt/pruner

Reduce size of pre-trained machine learning models
https://github.com/thiyangt/pruner

Last synced: 20 days ago
JSON representation

Reduce size of pre-trained machine learning models

Awesome Lists containing this project

README

        

---
output:
md_document:
variant: markdown_github
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# pruner

Reduces the size of a pre-trained machine learning models

You can install seer from github with:

```{r}
# install.packages("devtools")
#devtools::install_github("thiyangt/pruner")
library(pruner)
```

## Usage

```{r}
set.seed(71)
data(iris)
iris.rf <- randomForest::randomForest(Species ~ ., data=iris, importance=TRUE,proximity=TRUE)
s1 <- object.size(iris.rf)
print(s1, units = "auto")

prune_iris <- prune_rf(iris.rf)
s2 <- object.size(prune_iris)
print(s2, units = "auto")

```