alteryx / compose

A machine learning tool for automated prediction engineering. It allows you to easily structure prediction problems and generate labels for supervised learning.
https://compose.alteryx.com
BSD 3-Clause "New" or "Revised" License
492 stars 46 forks source link

Allow for multiple target variables to be generated #100

Closed BrendanSchell closed 4 years ago

BrendanSchell commented 4 years ago

In the case where I want to generate multiple target variables (for the same data slices), I currently have to loop through and join the tables together. It would be nice to be able to generate multiple target variables from a list of functions all at once.

jeff-hernandez commented 4 years ago

Hi @BrendanSchell,

Thanks for the feature request! If I understand correctly, this will let us apply multiple labeling functions to each data slice. For example, if we create a label maker using a list of labeling functions.

lm = cp.LabelMaker(
    ...
    labeling_function=[a, b, c],
)

Then, we can run the search and the returned labels will already be joined together.

lt = lm.search(...)
      target_id         cutoff_time       a      b       c
id                                            
0             1 2014-01-01 00:45:30    True   False   True
1             1 2014-01-01 00:46:35   False    True   True

Is this correct?

BrendanSchell commented 4 years ago

Yep, that's exactly what I was thinking!

jeff-hernandez commented 4 years ago

Nice, thanks for the confirmation! I will keep this issue updated on the progress.

jeff-hernandez commented 4 years ago

Hi @BrendanSchell,

This feature is available in the latest release 0.3.0! Let me know if you have any questions or feedback. Thanks again for the feature request!