Skip to main content

No project description provided

Project description

Tests

Deep Feature Synthesis in Rust

This is a project to implement the Deep Feature Synthesis algorithm in Rust.

Roadmap

  • (30JUL2022[^1]) Parity with Featuretools creating feature definitions (no calculation) on single table
  • Parity with Featuretools creating feature definitions (no calculation) on multiple tables
  • Explore Calculation on single table using Polars
  • Explore Calculation on multiple tables using Polars

[^1]: 3 primitives are not yet passing tests. 'diff_datetime', 'geomidpoint', 'age'

Running in Python

pip install rust_dfs

Using from python

# Import Featuretools, rust_dfs, and some other utility functions
import featuretools as ft
from rust_dfs.utils import *
from rust_dfs import generate_features, compare_featuresets

# Generate a fake dataset with 2 Integer columns
df = generate_fake_dataframe(
    n_rows=10,
    col_defs=[
        ([1,2,3], 2),
        # ("Boolean", 2),
    ]
)

# pick some primitives
f_primitives = [
    ft.primitives.GreaterThan,
    # ft.primitives.LessThan
]

# or use all of them
# f_primitives = list(ft.primitives.utils.get_transform_primitives().values())

# convert datafame to an entityset
es = df_to_es(df)

# run dfs with features_only=True
ft_feats = ft.dfs(
    entityset=es, 
    target_dataframe_name="nums", 
    trans_primitives=f_primitives, 
    features_only=True,
    max_depth=1
)

# ft_feats = [<Feature: F_0>, <Feature: F_1>, <Feature: F_0 > F_1>, <Feature: F_1 > F_0>]

# Convert back into a format that we can use to compare with rust
c_feats = list(convert_features(ft_feats).values())

# Now run using Rust

# convert featuretools primitives to rust primitives
r_primitives = convert_primitives(f_primitives)

# convert dataframe to rust features
r_features = dataframe_to_features(es.dataframes[0])

# generate engineered features using Rust (create new features only)
r_derived_feats = generate_features(r_features, r_primitives)


a,b = compare_featuresets(c_feats, r_derived_feats)

print("=== Features generated by Featuretools, that were NOT generated by Rust ===")
print(a)
print()
print("=== Features generated by Rust, that were NOT generated by Featuretools ===")
print(b)

Develop Guide

Create virtualenv

python -m venv .env
source .env/bin/activate
pip install maturin
pip install featuretools
pip install pandas

Ensure Cargo.toml is configured

[lib]
name = "rust_dfs"
crate-type = ["cdylib"]

Run maturin

maturin develop

Run main.rs

To run as a rust binary:

cargo run --no-default-features

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rust_dfs-0.2.0.tar.gz (34.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rust_dfs-0.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (380.3 kB view details)

Uploaded PyPymanylinux: glibc 2.5+ x86-64

rust_dfs-0.2.0-cp310-none-win_amd64.whl (299.2 kB view details)

Uploaded CPython 3.10Windows x86-64

rust_dfs-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (378.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ x86-64

rust_dfs-0.2.0-cp39-none-win_amd64.whl (299.3 kB view details)

Uploaded CPython 3.9Windows x86-64

rust_dfs-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (378.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

rust_dfs-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl (337.9 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

rust_dfs-0.2.0-cp38-none-win_amd64.whl (298.9 kB view details)

Uploaded CPython 3.8Windows x86-64

rust_dfs-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (378.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

rust_dfs-0.2.0-cp37-none-win_amd64.whl (298.9 kB view details)

Uploaded CPython 3.7Windows x86-64

rust_dfs-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (378.9 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

File details

Details for the file rust_dfs-0.2.0.tar.gz.

File metadata

  • Download URL: rust_dfs-0.2.0.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.20

File hashes

Hashes for rust_dfs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ca2705b5c81732a6d7b173b64daf88384b9f1bfabd6d9156fe447c9e2e09beed
MD5 e386b873d8a9628d4c0ffcdacbbdda5b
BLAKE2b-256 4e9e8df063998b7405b1611d0f6026cfbd4b3b058e26dce62801823e6cb5b01d

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8d2f32d4af8dacd1c3732f9545c4cf0276250e26f638c35c904acb05f03aa2d1
MD5 8d1838e0eb022ec0af776a9faa708533
BLAKE2b-256 054f866798f447f0f3b677545231ec8670875d49a9d6da939314316b2f6fb245

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp310-none-win_amd64.whl.

File metadata

  • Download URL: rust_dfs-0.2.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 299.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.20

File hashes

Hashes for rust_dfs-0.2.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 57517beffa760b62362b6643521ed9ca9669d1011c47905f2bdbd5bd7b30aab3
MD5 bf638eabf2870ef41ddee959c21aab70
BLAKE2b-256 e996194d04024b6d81129dc73998400cacefc30d6b79b5438831d6de2b0b2654

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 155c93c007cd93e5ede978ce1427866b363e542ea87727af5a9dc9e2908b0b32
MD5 9015f59e6d3335d1af4d96cb7f837d59
BLAKE2b-256 7f53aebed3f4f6226f57c59151204435f787f404a3a44fab0eb053878cb3077a

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp39-none-win_amd64.whl.

File metadata

  • Download URL: rust_dfs-0.2.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 299.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.20

File hashes

Hashes for rust_dfs-0.2.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 20c9b6cf51c74726abaea637c3784c89788f8f62ad2542e00f161bf5f275fb4c
MD5 e3c5aa923c7c80f6e50b7dbf8e9edda9
BLAKE2b-256 e1cbb07d26cfcd74ccf745dc1d3581ff70abc606acf0ecde5e5672bc5fea265f

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5c98817a584880fbe07664d3e6f90a8c1e051200445b23d94df3cf20c05a72ae
MD5 2daaf37cd43862ee3eb64fed52082453
BLAKE2b-256 f16ab80cb45960dc9b83d783825a55234dcccfe15f6b76e4d8066654a05a7c79

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0e6f91cc74372fef91df021e39b48de8b76ba040d41f3f39477ef6773d4c3734
MD5 471bd85150164fda8d6c1405b3fff44a
BLAKE2b-256 1b1e2fefcb3d511979189026df6d2c4dafd747382732c5ea133c42ee914530b1

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp38-none-win_amd64.whl.

File metadata

  • Download URL: rust_dfs-0.2.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 298.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.20

File hashes

Hashes for rust_dfs-0.2.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 4473c0c6c51beb2d3c48a4415b166f5fb5dd16927328ce4a88f4b609004d6705
MD5 21e30e5963cd3a4c95e12d7bd5631859
BLAKE2b-256 56c45e62e613b55c22810730833e5aa3c676358a6a1fa18e3426363b1be941a7

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a007a305e9a840a93ab9e388730e3e41892ed07d17803ae89067872b3448adc5
MD5 9d398fc12ef96b52017fb64d89a57fe6
BLAKE2b-256 10b310fd320082377165ccd4c4f4b4d156bbfe664e6a81f748a8e452cb5376a2

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp37-none-win_amd64.whl.

File metadata

  • Download URL: rust_dfs-0.2.0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 298.9 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.20

File hashes

Hashes for rust_dfs-0.2.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 b893263dcf2818afa353eab6ef4d0fd56cd21b6d57d5203faa34fc73171891f0
MD5 0cfc57057073b803939f066c1624c0ae
BLAKE2b-256 c04709ecbd06f5ac58419f2a06bc73ab90917ffe9e4f123200b51efea6f17154

See more details on using hashes here.

File details

Details for the file rust_dfs-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4ad67cc373c4b25ea10b3cf9ccbd6e54e24d02579d79f5074040ca7cd839279b
MD5 20e7e2472be5e517e337d3967ad4a4c4
BLAKE2b-256 4588b71bd065e80d34f5ef0c6a4cfef3a27528136afd125bb7e24a0feb712951

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page