Package: composeml
"Build better training examples in a fraction of the time."Composeis 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 alabeling function, then runs a search to automatically extract training examples from historical data. Its result is then provided toFeaturetoolsfor automated feature engineering and subsequently toEvalMLfor automated machine learning. The workflow of an applied machine learning engineer then becomes:By automating the early stage of the machine learning pipeline, our end user can easily define a task and solve it. See thedocumentationfor more information.InstallationInstall with pippython -m pip install composemlor from the Conda-forge channel onconda:conda install -c conda-forge composemlAdd-onsUpdate checker- Receive automatic notifications of new Compose releasespython -m pip install "composeml[update_checker]"ExampleWill 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.importcomposemlascpdf=cp.demos.load_transactions()df=df[df.columns[:7]]df.head()transaction_idsession_idtransaction_timeproduct_idamountcustomer_iddevice29812014-01-01 00:00:005127.642desktop1012014-01-01 00:09:45557.392desktop49512014-01-01 00:14:05569.452desktop460102014-01-01 02:33:505123.192tablet302102014-01-01 02:37:05564.472tabletFirst, we represent the prediction problem with a labeling function and a label maker.deftotal_spent(ds):returnds['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_idtimetotal_spent12014-01-01 00:00:00True12014-01-01 01:00:00True22014-01-01 00:00:00False22014-01-01 01:00:00False32014-01-01 00:00:00FalseWe now have labels that are ready to use inFeaturetoolsto generate features.SupportThe 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:For usage questions, useStack Overflowwith thecomposemltag.For bugs, issues, or feature requests start a Githubissue.For discussion regarding development on the core library, useSlack.For everything else, the core developers can be reached by email atopen_source_support@alteryx.comCiting ComposeCompose 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}}AcknowledgementsThe open source development has been supported in part by DARPA's Data driven discovery of models program (D3M).AlteryxComposeis an open source project maintained byAlteryx. We developed Compose to enable flexible definition of the machine learning task. To see the other open source projects we’re working on visitAlteryx Open Source. If building impactful data science pipelines is important to you or your business, please get in touch.