<div dir="ltr"><div>Dear David,</div><div><br></div>We recently submitted PipeGraph as a sklearn contrib project. Even though it is an ongoing project and we are right now modifying the interface in order to make it more suitable and useful for the sklearn community, I believe that the problems that you explain can be addressed by PipeGraph. <div>If you need the possibility of defining different/equal transformations for X and y you can do it by simply defining different steps for each path;</div><div>if you need different paths for fit and predict it is also possible to define them in PipeGraph.<br></div><div>Please have a look at the general examples and judge by yourself if it fits your needs:</div><div><br></div><div><a href="https://mcasl.github.io/PipeGraph/auto_examples/plot_4_example_combination_of_classifiers.html#sphx-glr-auto-examples-plot-4-example-combination-of-classifiers-py">https://mcasl.github.io/PipeGraph/auto_examples/plot_4_example_combination_of_classifiers.html#sphx-glr-auto-examples-plot-4-example-combination-of-classifiers-py</a></div><div><br></div><div>You can play with it using pip, for example:<br></div><div><br></div><div>pip install pipegraph</div><div><br></div><div>

<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">The API can<span> </span><span class="gmail-gr_ gmail-gr_232 gmail-gr-alert gmail-gr_gramm gmail-gr_inline_cards gmail-gr_run_anim gmail-Grammar gmail-multiReplace" id="gmail-232" style="display:inline;border-bottom:2px solid transparent;background-repeat:no-repeat;color:inherit;font-size:inherit">be considered</span><span> </span>far from stable and we are following the advice of the sklearn community to turn it into something as useful as possible, but it is my humble opinion that in situations like this PipeGraph can provide a suitable solution.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Best </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Manolo</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><br class="gmail-Apple-interchange-newline">

<br></div><div>Best regards</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-27 19:42 GMT+01:00 Guillaume Lemaître <span dir="ltr"><<a href="mailto:g.lemaitre58@gmail.com" target="_blank">g.lemaitre58@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Transforming y is a big deal :)<br></div>You can refer to <a href="https://github.com/scikit-learn/enhancement_proposals/pull/2" target="_blank">https://github.com/scikit-<wbr>learn/enhancement_proposals/<wbr>pull/2</a><br></div>and the associated issues/PR to see what is going on. This is probably an<br></div>additional use case to think about when designing estimator which will be<br></div><div>modifying y.<br></div><br></div>Regarding the pipeline, I assume that your strategy would be to resample at fit<br></div>and do nothing at predict, isn't it?<br><div><div><div><br></div><div>NB: you could actually implement this sampling in a FunctionSampler of imblearn:<br><a href="http://contrib.scikit-learn.org/imbalanced-learn/dev/generated/imblearn.FunctionSampler.html#imblearn.FunctionSampler" target="_blank">http://contrib.scikit-learn.<wbr>org/imbalanced-learn/dev/<wbr>generated/imblearn.<wbr>FunctionSampler.html#imblearn.<wbr>FunctionSampler</a><br></div><div>and then use the imblearn pipeline which would apply the transform at fit time but not <br></div><div>at predict.<br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 February 2018 at 18:02, David Burns <span dir="ltr"><<a href="mailto:david.mo.burns@gmail.com" target="_blank">david.mo.burns@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">First post on this mailing list.<br>
<br>
I have been working with time series data for a project, and thought I could contribute a new transformer to segment time series data using a sliding window, with variable overlap. I have attached demonstration of how this would fit in the existing framework. The only challenge for me here is that the transformer needs to transform both the X and y variable in order to perform the segmentation. I am not sure from the documentation how to implement this in the framework.<br>
<br>
Overlapping segments is a great way to boost performance for time series classifiers, so this may be a worthwhile contribution for some in this area of ML. Ultimately, model_selection.TimeSeries.Spl<wbr>it would need to be modified to support overlapping segments, or a new class created to enable validation for this.<br>
<br>
Please let me know if this would be a worthwhile contribution, and if so how to go about transforming the target vector y in the framework / pipeline?<br>
<br>
Thanks!<span class="m_-1121018012770750088HOEnZb"><font color="#888888"><br>
<br>
David Burns<br>
<br>
<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org" target="_blank">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/mailma<wbr>n/listinfo/scikit-learn</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_-1121018012770750088gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Guillaume Lemaitre<br>INRIA Saclay - Parietal team<br>Center for Data Science Paris-Saclay<br><a href="https://glemaitre.github.io/" target="_blank">https://glemaitre.github.io/</a></div></div></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
scikit-learn mailing list<br>
<a href="mailto:scikit-learn@python.org">scikit-learn@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scikit-learn" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/scikit-learn</a><br>
<br></blockquote></div><br></div>