Skip to content

jchacks/feature_jit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feature JIT

A library for describing transformations as a collection of binary trees written in rust with python bindings.

Example

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

Todo

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published