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

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

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

# Generate a fake dataset with 2 Integer columns
df = generate_fake_dataframe(
    n_rows=10,
    col_defs=[
        ("Integer", 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 = convert_features(ft_feats)

# 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)

# r_derived_feats = [GreaterThan_F_0_F_1 : Unknown : Unknown, GreaterThan_F_1_F_0 : Unknown : Unknown]

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.5.tar.gz (28.4 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.5-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (356.7 kB view details)

Uploaded PyPymanylinux: glibc 2.5+ x86-64

rust_dfs-0.1.5-cp310-none-win_amd64.whl (274.3 kB view details)

Uploaded CPython 3.10Windows x86-64

rust_dfs-0.1.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (355.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.5-cp39-none-win_amd64.whl (274.4 kB view details)

Uploaded CPython 3.9Windows x86-64

rust_dfs-0.1.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (355.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.5-cp39-cp39-macosx_10_7_x86_64.whl (317.2 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

rust_dfs-0.1.5-cp38-none-win_amd64.whl (274.1 kB view details)

Uploaded CPython 3.8Windows x86-64

rust_dfs-0.1.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (355.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

rust_dfs-0.1.5-cp38-cp38-macosx_11_0_arm64.whl (290.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

rust_dfs-0.1.5-cp37-none-win_amd64.whl (274.0 kB view details)

Uploaded CPython 3.7Windows x86-64

rust_dfs-0.1.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (355.2 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

File details

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

File metadata

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

File hashes

Hashes for rust_dfs-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4e39b0280f8261b7068b7165f4e60c11fa1474b2c6c113c5933b569ebc138162
MD5 af8021f35c78759d4e649c7192fb6d46
BLAKE2b-256 8d2f8d373d2352c37d9c4e046091f04398b41e98d59fc277940a98cf15d3b0a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c6c9555a424d7a2ab3d7d4ce3587bfebffd8562f479a6396b7eb3f4f10d17a02
MD5 04a2ce34a985e328dd07843086bd1a84
BLAKE2b-256 71430cdbc02c9ab78c4646e9fc285d51019e3781844f6a5f5993e29b99686b68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.5-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 274.3 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.5-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 e9dc45c577afba87dad7524dee61559e684707a785fbd261da063abc7ae0c33c
MD5 eb532048de87b365ad10e8906c0241fa
BLAKE2b-256 1a09d36dde99d366c2e3f097d2921d4046f4a97fa11ac85be1f57aa82f5c3195

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bff0d5cc3533635eedf4f67173898c3d010a4908e683d0e1305a2be5dd186f8b
MD5 acefa946c1949deafc47d6bc782565ba
BLAKE2b-256 8aa12758cf0d8671a351dcd645c37726a43d397767dcdb7385e6878a043310ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.5-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 274.4 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.5-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 261831fcf50c5421099f1d8e1295b76e1d6f661a6ded82b11732bd51598c6d73
MD5 93d1d189ac68cc3d28591a92ca66008a
BLAKE2b-256 3f64b01255b8cbfc28478cb6fc8818a99dc425cde1748e25bf1f6f27cf88cb74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0d9a0cd7df98d5887517b74c3693896f381f6a6a0f49a63543720c64eb5d1947
MD5 a259bd75457d84f6bcf9141835efb72a
BLAKE2b-256 182e29a93f6f667659008480d6e7e59a1894196b6ff42e23505d1b4bcd042b7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e0fcf85ebacfbdeb84da475b176a31273d2c8ce180b308bb3db3fab9ddb153c7
MD5 c18f650e413d6bc5ba88e6339bf81b84
BLAKE2b-256 d642da4c77e7f4aa27056ca700362e54d636cbb38593ddce19f0702a40aa0bad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.5-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 274.1 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.5-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 52fd121702e69db8ee0adae2460eeb8c662956228de29049331f44201f0acc72
MD5 fe17be0f5248d7b4af8621685c787448
BLAKE2b-256 a3fc7548eecfe57280d5129146d20e9381666932cdac56c9d3ff486ef4a5c93e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ddbf717aa4ba87dc638c5fe0419a17b356095835dcd24c007d49623fa3123d42
MD5 fedfa98dc160de6ccb51178f808237fe
BLAKE2b-256 795583c769bd418026e17e66d5b5a5f8ef31ed64d169fa82fa95004dc22b1d14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e7e864437f499f71caffe6f9cf370dc86df54d4ede4e91d5b801445862e2aef
MD5 c13c9c239e6e0eb0fdf6ef3cbf5da3e4
BLAKE2b-256 bce8d1a4e11d22aef160177283dc600d2bb81c29ec25aca5336c58ad42d26e38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rust_dfs-0.1.5-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 274.0 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.5-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 09bcaa7138ca40ae3f98ee32913769e5c1f05b476c3a74abdd1b241f664645fc
MD5 6e9bebdad519ceaa8040451ae06f9daa
BLAKE2b-256 479b80d0d98c1496d369a27bbc075da651cc6ad0a38ee219e7e075635450cb2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rust_dfs-0.1.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 873490001613c52e82d6aed5ecbd4b7de085700ad1169948f8c33dfb10f35d32
MD5 cc3eb8368c170d488b0ddbb60df7b7f2
BLAKE2b-256 38e5e72c2bbbdb5a327cd78e903dd743c432185458f9df870a113f633bed09bc

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