Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acalejos/mockingjay
Elixir implementation of Microsoft's Hummingbird library for converting trained Decision Tree models into tensor computations.
https://github.com/acalejos/mockingjay
Last synced: 3 months ago
JSON representation
Elixir implementation of Microsoft's Hummingbird library for converting trained Decision Tree models into tensor computations.
- Host: GitHub
- URL: https://github.com/acalejos/mockingjay
- Owner: acalejos
- License: apache-2.0
- Created: 2023-06-07T04:33:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-02T23:39:24.000Z (over 1 year ago)
- Last Synced: 2024-10-18T15:17:19.740Z (3 months ago)
- Language: Elixir
- Homepage:
- Size: 118 KB
- Stars: 68
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ml-gen-ai-elixir - Mockinjay - Implementation of Microsoft's [Hummingbird](https://github.com/microsoft/hummingbird) library for converting trained Decision Tree models into Nx tensor computations. (Machine Learning / Traditional Machine Learning)
README
# Mockingjay
[![Documentation](https://img.shields.io/badge/-Documentation-blueviolet)](https://hexdocs.pm/mockingjay)
Implementation of Microsoft's [Hummingbird](https://github.com/microsoft/hummingbird) library for converting trained Decision Tree
models into tensor computations.## How to Use
Implement the `DecisionTree` protocol for any data source you would like to compile. Then you can use `Mockingjay.convert/1`
to generate an `Nx.Defn` prediction function that makes inferences. The output of `convert` will be a function with the signature
`fn x -> predict(x)`. The three strategies are GEMM, TreeTraversal, and PerfectTree traversal. You can specify the strategy using the
`:strategy` option in `convert` or use a heuristic strategy by default. The heuristic used is generally:* GEMM: Shallow Trees (<=3)
* PerfectTreeTraversal: Tall trees where depth <= 10
* TreeTraversal: Tall trees unfit for PTT (depth > 10)## Installation
```elixir
def deps do
[
{:mockingjay, "~> 0.1"}
]
end
```