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

Decision tree model in daal4py runs slower than the sklearn model

tcs_hormazd
Beginner
3,882 Views

Hello,

 

When running the daal4py decision tree model on a dataset, we notice that it takes longer to run that the sklearn decision tree model. This observation is unusual, as most of the models we've tested have a faster runtime with the daal4py implementation than the sklearn implementation. Do we know what the cause of the slow performance is for the daal4py decision tree model? Could it be that since the decision tree in daal4py does not have all the same hyperparameters available in the sklearn decision tree model, the daal4py decision tree has a set of default hyperparameters that lead to slower performance (e.g. min_samples_split, max_features, etc. which are adjustable for the sklearn model but not the daal4py model)?

0 Kudos
1 Solution
RahulU_Intel
Moderator
3,576 Views

Hi,


We haven't heard back from you. Did you get any chance to try out the samples from your side. Could you please share with us if you have any update.


Thanks

Rahul


View solution in original post

0 Kudos
9 Replies
RahulU_Intel
Moderator
3,855 Views

Hi,


Thanks for posting in Intel communities. We looked into your case. We are trying to reproduce your issue from our side. Meanwhile could you please share with us the sample you are running and what differences in results you observed while running both the decision tree models.


Thanks and Regards

Rahul


0 Kudos
RahulU_Intel
Moderator
3,819 Views

Hi,

 

We tried reproducing your issue at our end. We were able to see the performance improvement for daal4py when we compared it with the sklearn. We tried on this sample (https://github.com/intel/scikit-learn-intelex/blob/master/examples/daal4py/decision_tree_classification_batch.py). Could you please share with us the sample reproducer so that we can try the same sample from our side.

 

Thanks and Regards

Rahul

 

0 Kudos
RahulU_Intel
Moderator
3,728 Views

Hi,


We haven't heard back anything from you. Could you please confirm if the issue is resolved.


Thanks

Rahul




0 Kudos
tcs_hormazd
Beginner
3,684 Views

Thank you for your reply, and sorry for my delay in the response. I am currently running some tests on my end to compare the two models on different datasets to confirm which datasets a speed-up appears on.

0 Kudos
RahulU_Intel
Moderator
3,577 Views

Hi,


We haven't heard back from you. Did you get any chance to try out the samples from your side. Could you please share with us if you have any update.


Thanks

Rahul


0 Kudos
tcs_hormazd
Beginner
3,570 Views

Hi. We ran the sklearn model and the daal4py decision tree models on some datasets. We observed a speed-up in some cases and a slowdown in some cases (such as when we used the model within a processing pipeline). We are running more tests to figure out exactly in which situations a speed-up occurs and in which situations a slow-down occurs.

 

 

0 Kudos
RahulU_Intel
Moderator
3,416 Views

Hi,

 

We tried some samples from our side using both stock Sklearn and daal4py on some datasets. We got improved performance for almost all the datasets for the daal4py one. Could you please share with us the results of your observation and the datasets you tried on your side.

 

Thanks

Rahul

 

0 Kudos
RahulU_Intel
Moderator
3,299 Views

Hi,


We haven't heard back from you. Could you please share with us if you have any update.


Thanks

Rahul



0 Kudos
RahulU_Intel
Moderator
3,253 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.


Thanks and Regards

Rahul



0 Kudos
Reply