shankarpandala / lazypredict

Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning
MIT License
2.87k stars 333 forks source link

Add "Intel® Extension for Scikit-learn" for better performance #382

Open Ankur-singh opened 2 years ago

Ankur-singh commented 2 years ago

Just by adding two lines of code, we can drastically improve the performance. Intel Extension for SciKit-learn package dynamically patches scikit-learn estimators while improving performance of machine learning algorithms particularly for Intel CPUs and GPUs.

More details regarding usage and benchmarks can be find here : https://www.intel.com/content/www/us/en/developer/tools/oneapi/scikit-learn.html

Just by adding these two lines at the top should do the job.

from sklearnex import patch_sklearn
patch_sklearn()

I can help if, anyone is interested in doing it. Else, I can do it.

Other contributors, let me know if you have any suggestions ?

rahulunair commented 2 years ago

@Ankur-singh i will take this up :), i always wanted a quick way to get initial preds, as lazypredict already does that, let's try to make it as fast as we can!

Ankur-singh commented 2 years ago

sure @rahulunair. It would be great if you can also benchmark and share the results. Other members will also be able to see the performance gains because of Intel Extension for SciKit-learn.

rahulunair commented 2 years ago

@Ankur-singh just added a patch, tested with few toy datasets on an laptop with i7, got around ~1.5x perf improvement vs stock. If you have time, it would be nice to take one of the bigger datasets from this repo and compare perf as well: https://github.com/IntelPython/scikit-learn_bench