Intel® oneAPI Data Analytics Library
Learn from community members on how to build compute-intensive applications that run efficiently on Intel® architecture.

Pipelines in DAAL

Matt_P_1
Beginner
2,321 Views

Hi,

I'm looking to set up an online-learning pipeline in DAAL, and would like to replicate existing (working) scikit-learn code I have built around their Pipeline object. Is there a similar object in pyDAAL, and if so can anyone point me to a code containing it?

Thanks!

Matt

0 Kudos
4 Replies
Sergey_M_Intel2
Employee
2,321 Views

Hi Matt,

Can you give an example how your pipeline looks like? What transforms does it involve?

Sergey Maidanov

0 Kudos
Matt_P_1
Beginner
2,321 Views

Hi,

Sorry for the slow reply. The current workflow involves multiple LabelEncoder (one applied to each of a list of columns), a StandardScaler, and an SVM algorithm.

0 Kudos
Matt_P_1
Beginner
2,321 Views

Hi Sergey -

Any update on this?

Thanks!

Matt

0 Kudos
Nathan_G_Intel
Employee
2,321 Views

Matt, 

I'm assuming you mean the class sklearn.pipeline.Pipeline.

No DAAL does not have an equivalent pipeline class. However sklearn allows for custom transformers to be inserted into their pipeline object. The custom transformer is an object you create yourself, with the requirement of "fit" and "transform" methods.

You can build a smaller wrapper object around DAAL algo object, and insert it into sklearn's pipeline as a custom transformer. 

There is a nice blog about this here:

https://opendevincode.wordpress.com/2015/08/01/building-a-custom-python-scikit-learn-transformer-for-machine-learning/

 

 

0 Kudos
Reply