Entertainment at it's peak. The news is by your side.

Label Generation for ML



“Originate higher coaching examples in a share of the time.”




PyPI Version


PyPI Downloads

Compose is a machine finding out tool for automatic prediction engineering. It enables you to development prediction problems and generate labels for supervised finding out. An stop user defines an of passion by writing a labeling feature, then runs a search to automatically extract coaching examples from historical records. Its consequence is then supplied to Featuretools for automatic feature engineering and subsequently to EvalML for automatic machine finding out. The workflow of an applied machine finding out engineer then becomes:


By automating the early stage of the machine finding out pipeline, our stop user can with out pickle account for a role and solve it. Search for the documentation for more data.

Set up

Compose is obtainable on PyPI and Conda-forge for Python 3.6 or later.


To install from PyPI, speed the expose:

pip install composeml


To install from Conda-forge, speed the expose:

conda install -c conda-forge composeml


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

On this situation, we automatically generate fresh coaching examples from a historical dataset of transactions.

import composeml as cp
df = cp.demos.load_transactions()
df = df[df.columns[:7]]
transaction_id session_id transaction_time product_id quantity customer_id machine
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 signify the prediction disclose with a labeling feature and a note maker.

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

label_maker = cp.LabelMaker(

Then, we speed a search to automatically generate the coaching examples.

label_times =

label_times = label_times.threshold(300)
customer_id time total_spent
1 2014-01-01 00: 00: 00 Appropriate
1 2014-01-01 01: 00: 00 Appropriate
2 2014-01-01 00: 00: 00 Counterfeit
2 2014-01-01 01: 00: 00 Counterfeit
3 2014-01-01 00: 00: 00 Counterfeit

We have now labels that are prepared to exercise in Featuretools to generate ideas.

Beef up

The Innovation Labs originate supply neighborhood is chuffed to supply toughen to customers of Compose. Venture toughen will likely be stumbled on in three locations reckoning on the form of search data from:

  1. For utilization questions, exercise Stack Overflow with the composeml note.
  2. For bugs, points, or feature requests delivery a Github scenario.
  3. For discussion concerning pattern on the core library, exercise Slack.

Citing Compose

Compose is constructed upon a newly outlined half of the machine finding out course of — prediction engineering. Whenever you happen to make exercise of Compose, please receive into consideration citing this paper:
James Max Kanter, Gillespie, Owen, Kalyan Veeramachaneni. Label, Phase,Featurize: a substandard enviornment framework for prediction engineering. IEEE DSAA 2016.

BibTeX entry:

  title={Label, section, featurize: a substandard enviornment framework for prediction engineering},
  author={Kanter, James Max and Gillespie, Owen and Veeramachaneni, Kalyan},
  booktitle={2016 IEEE International Convention on Knowledge Science and Progressed Analytics (DSAA)},


The originate supply pattern has been supported in half by DARPA’s Knowledge driven discovery of models program (D3M).

Innovation Labs

Innovation Labs

Compose has been developed and originate sourced by Innovation Labs. We developed Compose to permit versatile definition of the machine finding out job. To locate the replacement originate supply projects we’re working on visit Innovation Labs.

Read More

Leave A Reply

Your email address will not be published.