[scikit-learn] Pipegraph is on its way!

Manuel Castejón Limas manuel.castejon at gmail.com
Fri Feb 9 02:57:09 EST 2018


Docs are coming soon. In the meantime

, Imagine a first step containing a TrainTestSplit class with a similar
behaviour to train_test_split but capable of producing results by using fit
and predict (this is a goodie). The inputs will be X, y, z, ... , and the
outputs the same names + _train and _test.

A second step could be a MinMaxScaler taking only X_train.

A third step a linear model using the output from MinMaxScaler as X.

This would be written:
connections['split'] =  {'A': 'X', 'B': 'y'}
Meaning that the 'split' step will use the X and y from the fit or predict
call calling them A and B internally.

If you use, for instance,

 my_pipegraph.fit(X=myX, y=myY)

This step will produce A_train with a piece of myX

You can use this later:
connections['scaler'] = { 'X': ('split', 'A_train')}
Expressing that the output A_train from the split step will be use as input
X for the scaler. The output from this step is called 'predict'

Finally, for the third step:
connections['linear_model'] ={'X': ('scaler', 'predict'), 'y': ('split',
'B_train')}

Notice, that if we are talking about an external input variable we don't
use a tuple.
So the syntax is something like connection[step_label] =
{internal_variable: (input_step, variable_there)}

Docs are coming anyway. Travis CI, Circle CI and Appveyor have been
successfully activated at GitHub.com/mcasl/PipeGraph

Sorry if you found mistypos, I use my smartphone for replying.
Best
Manuel


El 7 feb. 2018 11:32 p. m., "Andreas Mueller" <t3kcit at gmail.com> escribió:

> Thanks Manuel, that looks pretty cool.
> Do you have a write-up about it? I don't entirely understand the
> connections setup.
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20180209/a1800b3e/attachment.html>


More information about the scikit-learn mailing list