A library for describing transformations as a collection of binary trees written in rust with python bindings.
from feature_jit import PyFeature as Feature
data = {"a": 1, "b": 2}
d = Feature("a") + Feature("b")
c = (Feature("a") / Feature("b")).alias("c")
e = c * d
print(e)
# PyFeature(name=c, transform=Some(Mul(Feature { name: "c", transform: Some(Div(Feature { name: "a", transform: None }, Feature { name: "b", transform: None })) }, Feature { name: "a", transform: Some(Add(Feature { name: "a", transform: None }, Feature { name: "b", transform: None })) })))
print(e.get_roots())
# ['a', 'b']
print(e.interpret(data))
# 1.5
- Add support for different feature types e.g. StringFeatures, IntFeatures
- Add a feature collection class that can transform all features efficiently
- Investigate allocating features in a memory arena for efficient traversal
- Add support for more transformers e.g. IntEncoding, TargetEncoding
- Add some benchmarks comparing to pure python code
- Investigate if its possible to interact with Pandas, Numpy, Polars etc directly in Rust.