• Stars
    star
    497
  • Rank 88,652 (Top 2 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A machine learning tool for automated prediction engineering. It allows you to easily structure prediction problems and generate labels for supervised learning.

Compose

"Build better training examples in a fraction of the time."

Tests ReadTheDocs PyPI Version StackOverflow PyPI Downloads


Compose is a machine learning tool for automated prediction engineering. It allows you to structure prediction problems and generate labels for supervised learning. An end user defines an outcome of interest by writing a labeling function, then runs a search to automatically extract training examples from historical data. Its result is then provided to Featuretools for automated feature engineering and subsequently to EvalML for automated machine learning. The workflow of an applied machine learning engineer then becomes:


Compose


By automating the early stage of the machine learning pipeline, our end user can easily define a task and solve it. See the documentation for more information.

Installation

Install with pip

python -m pip install composeml

or from the Conda-forge channel on conda:

conda install -c conda-forge composeml

Add-ons

Update checker - Receive automatic notifications of new Compose releases

python -m pip install "composeml[update_checker]"

Example

Will a customer spend more than 300 in the next hour of transactions?

In this example, we automatically generate new training examples from a historical dataset of transactions.

import composeml as cp
df = cp.demos.load_transactions()
df = df[df.columns[:7]]
df.head()
transaction_id session_id transaction_time product_id amount customer_id device
298 1 2014-01-01 00:00:00 5 127.64 2 desktop
10 1 2014-01-01 00:09:45 5 57.39 2 desktop
495 1 2014-01-01 00:14:05 5 69.45 2 desktop
460 10 2014-01-01 02:33:50 5 123.19 2 tablet
302 10 2014-01-01 02:37:05 5 64.47 2 tablet

First, we represent the prediction problem with a labeling function and a label maker.

def total_spent(ds):
    return ds['amount'].sum()

label_maker = cp.LabelMaker(
    target_dataframe_index="customer_id",
    time_index="transaction_time",
    labeling_function=total_spent,
    window_size="1h",
)

Then, we run a search to automatically generate the training examples.

label_times = label_maker.search(
    df.sort_values('transaction_time'),
    num_examples_per_instance=2,
    minimum_data='2014-01-01',
    drop_empty=False,
    verbose=False,
)

label_times = label_times.threshold(300)
label_times.head()
customer_id time total_spent
1 2014-01-01 00:00:00 True
1 2014-01-01 01:00:00 True
2 2014-01-01 00:00:00 False
2 2014-01-01 01:00:00 False
3 2014-01-01 00:00:00 False

We now have labels that are ready to use in Featuretools to generate features.

Support

The Innovation Labs open source community is happy to provide support to users of Compose. Project support can be found in three places depending on the type of question:

  1. For usage questions, use Stack Overflow with the composeml tag.
  2. For bugs, issues, or feature requests start a Github issue.
  3. For discussion regarding development on the core library, use Slack.
  4. For everything else, the core developers can be reached by email at [email protected]

Citing Compose

Compose is built upon a newly defined part of the machine learning process — prediction engineering. If you use Compose, please consider citing this paper: James Max Kanter, Gillespie, Owen, Kalyan Veeramachaneni. Label, Segment,Featurize: a cross domain framework for prediction engineering. IEEE DSAA 2016.

BibTeX entry:

@inproceedings{kanter2016label,
  title={Label, segment, featurize: a cross domain framework for prediction engineering},
  author={Kanter, James Max and Gillespie, Owen and Veeramachaneni, Kalyan},
  booktitle={2016 IEEE International Conference on Data Science and Advanced Analytics (DSAA)},
  pages={430--439},
  year={2016},
  organization={IEEE}
}

Acknowledgements

The open source development has been supported in part by DARPA's Data driven discovery of models program (D3M).

Alteryx

Compose is an open source project maintained by Alteryx. We developed Compose to enable flexible definition of the machine learning task. To see the other open source projects we’re working on visit Alteryx Open Source. If building impactful data science pipelines is important to you or your business, please get in touch.

Alteryx Open Source

More Repositories

1

featuretools

An open source python library for automated feature engineering
Python
7,242
star
2

evalml

EvalML is an AutoML library written in python.
Python
772
star
3

open_source_demos

A collection of demos showcasing automated feature engineering and machine learning in diverse use cases
Jupyter Notebook
496
star
4

predict-customer-churn

A general-purpose framework for solving problems with machine learning applied to predicting customer churn
Jupyter Notebook
405
star
5

Automated-Manual-Comparison

Automated vs Manual Feature Engineering Comparison. Implemented using Featuretools.
Jupyter Notebook
327
star
6

predict-remaining-useful-life

Predict remaining useful life of a component based on historical sensor observations using automated feature engineering
Jupyter Notebook
229
star
7

locust-grasshopper

a load testing tool extended from locust
Python
177
star
8

woodwork

Woodwork is a Python library that provides robust methods for managing and communicating data typing information.
Python
144
star
9

autonormalize

python library for automated dataset normalization
Python
110
star
10

predict-loan-repayment

Predict whether a loan will be repaid using automated feature engineering.
Jupyter Notebook
64
star
11

predict-taxi-trip-duration

Predict taxi trip duration based on historical trips using automated feature engineering
Jupyter Notebook
60
star
12

categorical_encoding

Repository for the research and implementation of categorical encoding into a Featuretools-compatible Python library
Jupyter Notebook
50
star
13

nlp_primitives

Natural Language Processing primitives for Featuretools
Python
37
star
14

featuretools-tsfresh-primitives

TSFresh primitives for featuretools
Python
36
star
15

predict-malicious-cyber-connections

Predict whether internet traffic is malicious given historical router traffic data
Jupyter Notebook
34
star
16

predict-correct-answer

Predict whether a student will correctly answer a problem based on past performance using automated feature engineering
HTML
32
star
17

DSx

Hands on tutorials demonstrating the concepts of Prediction engineering, Feature engineering and automation in data science.
Jupyter Notebook
29
star
18

predict-appointment-noshow

Predict whether or not a patient will show up to their next appointment using automated feature engineering
Jupyter Notebook
29
star
19

predict-olympic-medals

Predict how many medals a country will win at the Olympics based on past performance using automated feature engineering
Jupyter Notebook
29
star
20

snakeplane

A flexible, easy-to-use abstraction layer for building tools for the Alteryx Python SDK
Python
27
star
21

python-sdk-samples

A repository for all sample plugins created with the Alteryx python SDK
Python
25
star
22

predict-household-poverty

Predict the poverty of households in Costa Rica using automated feature engineering.
Jupyter Notebook
23
star
23

AlteryxRhelper

Create, manage and edit R code outside Alteryx in an IDE
R
20
star
24

alteryx-tool-generator

Generator to scaffold a custom Alteryx Designer tool.
JavaScript
18
star
25

DL-DB

Deep learning for time-varying multi-entity datasets
Python
17
star
26

cookbook-alteryx-server

Chef cookbook for Alteryx Server
Ruby
16
star
27

promote-python

Python library for deploying models built using Python to Alteryx Promote.
Python
16
star
28

henchman

A collection of repeated use utility functions for notebook demos.
Python
15
star
29

AlteryxPredictive

This is an R package containing utility functions used by the predictive tools in Alteryx.
R
15
star
30

ayx-developer-sdk

Alteryx Developer Software Development Kit (SDK)
12
star
31

featuretools-sklearn-transformer

Featuretools' DFS as a scikit-learn transformer
Python
11
star
32

sparkGLM

An R-like GLM package for Apache Spark
Scala
10
star
33

featuretools_sql

Automated creation of EntitySets from relational data stored in SQL databases
Python
10
star
34

flightdeck

Interactive Dashboard for Predictive Models
CSS
8
star
35

mini-tate

TypeScript
8
star
36

featuretools-docker

Use docker to provision Featuretools with a Jupyter notebook server
Dockerfile
7
star
37

dev-harness

TypeScript
7
star
38

jeeves

A sagacious valet to build and maintain predictive tools in Alteryx.
R
7
star
39

alteryx-ui

JavaScript
6
star
40

learning-guide

Want to use Alteryx, but not sure where to start? To guide you through your journey, we have provided a comprehensive list of available resources!
HTML
6
star
41

ui-automation-samples

HTML
5
star
42

pythontool-ayx-package

Python
5
star
43

OpenYXDB

C
5
star
44

gh-action-ci

A GitHub Action integrated with the GitHub and CircleCI API.
Python
5
star
45

promote-r-client

R package for deploying models built using R to Alteryx Promote.
R
5
star
46

DLDB-Demos

Jupyter Notebook
5
star
47

premium_primitives

Python
4
star
48

D3M-Online-Retail-Dataset

Convert D3M raw dataset to D3M clean dataset with Featuretools
Python
4
star
49

JavaScriptTool

Alteryx tool to execute arbitrary JavaScript code within the Alteryx workflow.
JavaScript
4
star
50

generator-node-typescript-simple

An opinionated yeoman generator for node packages with typescript. Based on generator-node-typescript.
JavaScript
3
star
51

AlteryxSim

R package for Simulation in Alteryx
R
3
star
52

react-comms

JavaScript
3
star
53

AlteryxPrescriptive

R Package for Optimization in Alteryx
R
3
star
54

alteryx-open-src-update-checker

An add-on for Alteryx open source that automatically checks for the latest updates and warnings you when an Alteryx package is out of date.
Python
3
star
55

gh-action-pypi-upload

GitHub action to upload to PyPi
Shell
2
star
56

AlteryxPythonSdk-teaching-a-spider-to-crawl

Python
2
star
57

ta1-primitives

Python
2
star
58

predict-restaurant-rating

Predict the rating given to a restaurant based solely on the review text. Uses custom NLP primitives.
Jupyter Notebook
2
star
59

Code_for_weekly_challenge

Code used to generate datasets for Alteryx's weekly challenges on the Community
R
1
star
60

adobe-analytics

Generate on demand report data from your Adobe Analytics report suites.
JavaScript
1
star
61

AlteryxAddins

R
1
star
62

GoogleAnalytics

Alteryx Google Analytics Plugin
JavaScript
1
star
63

Logistic_Regression

Logistic Regression Tool
CSS
1
star
64

CheckMates

CheckMate is an AutoML library which catches and warns of problems with your data and problem setup before modeling
Python
1
star