Skip to main content

No project description provided

Project description

Deep Feature Synthesis in Rust

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

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.1.6.tar.gz (31.1 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.1.6-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (371.5 kB view details)

Uploaded PyPymanylinux: glibc 2.5+ x86-64

rust_dfs-0.1.6-cp310-none-win_amd64.whl (288.7 kB view details)

Uploaded CPython 3.10Windows x86-64

rust_dfs-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (369.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.6-cp39-none-win_amd64.whl (288.9 kB view details)

Uploaded CPython 3.9Windows x86-64

rust_dfs-0.1.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (369.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.6-cp39-cp39-macosx_11_0_arm64.whl (310.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

rust_dfs-0.1.6-cp39-cp39-macosx_10_7_x86_64.whl (329.9 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

rust_dfs-0.1.6-cp38-none-win_amd64.whl (288.4 kB view details)

Uploaded CPython 3.8Windows x86-64

rust_dfs-0.1.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (369.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.6-cp38-cp38-macosx_11_0_arm64.whl (310.1 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

rust_dfs-0.1.6-cp37-none-win_amd64.whl (288.4 kB view details)

Uploaded CPython 3.7Windows x86-64

rust_dfs-0.1.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (369.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

File details

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

File metadata

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

File hashes

Hashes for rust_dfs-0.1.6.tar.gz
Algorithm Hash digest
SHA256 8de15f5b12e001434f742449ed85ac1f1417b45c463b4d4ce9b3c49cd9014451
MD5 c1c301fcf254256504ab863c03c2479d
BLAKE2b-256 4eec6a3a48a8c65f21489c183a99f7d9801a2d10f525db0ec471e4458c8c91ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5ac7bc2220ff4e9f797ab71aa1485ac00e57dbcbde100b684aad52b017c24847
MD5 18d90c3fb05a64e6ba0be1661752beb5
BLAKE2b-256 a9db525075b23c412c80b01628ab5ea92def02a3d7ab646ff07920c9ea45383d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.6-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 288.7 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.1.6-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 6875f510380b654bf7798dbd6c189510c6beaf6ffa9fa1df57a7dba34023100c
MD5 c6c7919cc864ae46fefbf33cfb9a4e87
BLAKE2b-256 a2cd83479602c2c050df0eea1373eb86df95d787fa27acf96dae6f715d25a566

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 70963dc8364865e16755b5d9065cf3d892243b32efdb8d1a10a73afdb567b03c
MD5 e0355a3f8a03610799e73cd574633d2a
BLAKE2b-256 26a52fe9fe1bd22e250fb33b80e90a8ef49e71b2353b9386c0d6f4a5b3da5a44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.6-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 288.9 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.1.6-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 fe046310cb18c1faafde824cfbe14fdf0c9333b4087ff2ce9e74092f2f7a9754
MD5 861b1638e9665382740cead4fb5b41ec
BLAKE2b-256 3970ff3eb03e13106920bfdecbf3e369ee334d1ba0b890774fa4489516cb232f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 021fa3b46810ec8a74e731ab0258fa4967eb17b311262e966b4fefac5dd0cb88
MD5 bf92ed46b1339719695e1312e2a8a1e4
BLAKE2b-256 ae37d6885deb883621dbc8334f97b6a9a833812e0444eb5d57df8d71cafe6b6e

See more details on using hashes here.

File details

Details for the file rust_dfs-0.1.6-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93e57e39e553f16e7d4c31313cb9dc4f7c4aa6b92c723fd7fa57ce815abb8d53
MD5 d5e067b45d6a95e53de351ae6f38e66c
BLAKE2b-256 ca759130cffcf6e7f1071c7c82173973922378f09d7b9f2ab246ae91a0720e4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 3d999d806227d887cb887223ceceeb7728b9f086bdfb90fcfcb7084982001d90
MD5 5173819690e6b83c532a00f0fcef4839
BLAKE2b-256 6c07976b4a073c9569d7f0da81cd51c62d4c3bb2f15f43b2c16fb0d45d8f0075

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.6-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 288.4 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.1.6-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 0336b6a5f05b4d3701fc34d59c69e3847069745240bca19b1c50d413266b7731
MD5 f32e43ac34d552350339332d65fc5881
BLAKE2b-256 37f759a1e88cdbeec9a0f693cdf0dde3402d71fe9470db87585e22c97ff9da03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 39fb993182a536a44248e143fb815d7e1fb8c4fbae65a1f706f55d19bd456bc7
MD5 5a51533c12ffad1b8ccde7c4875bc95e
BLAKE2b-256 5436e5b3e79c619bc33efff9e04bc5c183955d2cfc317d165d2beeffb45eb46c

See more details on using hashes here.

File details

Details for the file rust_dfs-0.1.6-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 682c65129a33a17f0eef5b1f64fa34c16e53e889aa74f9c2915950d8a1df5ce6
MD5 24a0d8ddf8dae09e99dae4e2dafb0f79
BLAKE2b-256 4a929a7ce4ba41948d3b13e6d07a31415814a732c1b8aac7b46aaf399780d173

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.6-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 288.4 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.1.6-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 26d96a4bce8598b179e8557900d388c3296af9c75b448a94a2acce21a5e30548
MD5 d5ce2f97da678a6206285d9b29695129
BLAKE2b-256 4076a1c3c7bc3ad32826f3ff58474df01fa7b0c1de157b257eb0bc78643821f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f274c1ccd02b82fd93ca55388262f018d4ee46c80dc36c26cac7bdc5b6b79c7f
MD5 0c51bb3dc744769873dbeec8ff0e1f88
BLAKE2b-256 3aad72940374f93977e2bc6d155ec7267e725fcfb3e7c0d32bf53b1a75f57701

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