Skip to main content

Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application.

Project description

Intel(R) Extension for Scikit-learn*

Build Status Coverity Scan Build Status Join the community on GitHub Discussions PyPI Version Conda Version

Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application. The acceleration is achieved through the use of the Intel(R) oneAPI Data Analytics Library (oneDAL). Patching scikit-learn makes it a well-suited machine learning framework for dealing with real-life problems.

⚠️Intel(R) Extension for Scikit-learn contains scikit-learn patching functionality that was originally available in daal4py package. All future updates for the patches will be available only in Intel(R) Extension for Scikit-learn. We recommend you to use scikit-learn-intelex package instead of daal4py. You can learn more about daal4py in daal4py documentation.

Running the latest scikit-learn test suite with Intel(R) Extension for Scikit-learn: CircleCI

👀 Follow us on Medium

We publish blogs on Medium, so follow us to learn tips and tricks for more efficient data analysis the help of Intel(R) Extension for Scikit-learn. Here are our latest blogs:

🔗 Important links

💬 Support

Report issues, ask questions, and provide suggestions using:

You may reach out to project maintainers privately at onedal.maintainers@intel.com

🛠 Installation

Intel(R) Extension for Scikit-learn is available at the Python Package Index, on Anaconda Cloud in Conda-Forge channel and in Intel channel.

# PyPi (recommended by default)
pip install scikit-learn-intelex
# Anaconda Cloud from Conda-Forge channel (recommended for conda users by default)
conda install scikit-learn-intelex -c conda-forge
# Anaconda Cloud from Intel channel (recommended for Intel® Distribution for Python users)
conda install scikit-learn-intelex -c intel
[Click to expand] ℹ️ Supported configurations

📦 PyPi channel

OS / Python version Python 3.6 Python 3.7 Python 3.8 Python 3.9
Linux [CPU, GPU] [CPU, GPU] [CPU, GPU]
Windows [CPU, GPU] [CPU, GPU] [CPU, GPU]
OsX [CPU] [CPU] [CPU]

📦 Anaconda Cloud: Conda-Forge channel

OS / Python version Python 3.6 Python 3.7 Python 3.8 Python 3.9
Linux [CPU] [CPU] [CPU] [CPU]
Windows [CPU] [CPU] [CPU] [CPU]
OsX [CPU] [CPU] [CPU] [CPU]

📦 Anaconda Cloud: Intel channel

OS / Python version Python 3.6 Python 3.7 Python 3.8 Python 3.9
Linux [CPU, GPU] [CPU, GPU] [CPU, GPU]
Windows [CPU, GPU] [CPU, GPU] [CPU, GPU]
OsX [CPU] [CPU] [CPU]

You can build the package from sources as well.

⚡️ Get Started

Intel CPU optimizations patching

import numpy as np
from sklearnex import patch_sklearn
patch_sklearn()

from sklearn.cluster import DBSCAN

X = np.array([[1., 2.], [2., 2.], [2., 3.],
              [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
clustering = DBSCAN(eps=3, min_samples=2).fit(X)

Intel GPU optimizations patching

import numpy as np
from sklearnex import patch_sklearn
from daal4py.oneapi import sycl_context
patch_sklearn()

from sklearn.cluster import DBSCAN

X = np.array([[1., 2.], [2., 2.], [2., 3.],
              [8., 7.], [8., 8.], [25., 80.]], dtype=np.float32)
with sycl_context("gpu"):
    clustering = DBSCAN(eps=3, min_samples=2).fit(X)

🚀 Scikit-learn patching

Speedups of Intel(R) Extension for Scikit-learn over the original Scikit-learn
Technical details: float type: float64; HW: Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz, 2 sockets, 28 cores per socket; SW: scikit-learn 0.23.1, Intel® oneDAl (2021.1 Beta 10), benchmark code

Intel(R) Extension for Scikit-learn patching affects performance of specific Scikit-learn functionality listed below. In cases when unsupported parameters are used, the package fallbacks into original Scikit-learn. These limitations described below. If the patching does not cover your scenarios, submit an issue on GitHub.

[Click to expand] 🔥 Applying the patching will impact the following existing scikit-learn algorithms:
Task Functionality Parameters support Data support
Classification SVC All parameters except kernel = 'poly' and 'sigmoid'. No limitations.
RandomForestClassifier All parameters except warmstart = True and cpp_alpha != 0, criterion != 'gini'. Multi-output and sparse data is not supported.
KNeighborsClassifier All parameters except metric != 'euclidean' or minkowski with p != 2. Multi-output and sparse data is not supported.
LogisticRegression / LogisticRegressionCV All parameters except solver != 'lbfgs' or 'newton-cg', class_weight != None, sample_weight != None. Only dense data is supported.
Regression RandomForestRegressor All parameters except warmstart = True and cpp_alpha != 0, criterion != 'mse'. Multi-output and sparse data is not supported.
KNeighborsRegressor All parameters except metric != 'euclidean' or minkowski with p != 2. Sparse data is not supported.
LinearRegression All parameters except normalize != False and sample_weight != None. Only dense data is supported, #observations should be >= #features.
Ridge All parameters except normalize != False, solver != 'auto' and sample_weight != None. Only dense data is supported, #observations should be >= #features.
ElasticNet All parameters except sample_weight != None. Multi-output and sparse data is not supported, #observations should be >= #features.
Lasso All parameters except sample_weight != None. Multi-output and sparse data is not supported, #observations should be >= #features.
Clustering KMeans All parameters except precompute_distances and sample_weight != None. No limitations.
DBSCAN All parameters except metric != 'euclidean' or minkowski with p != 2, algorithm != brute or auto . Only dense data is supported.
Dimensionality reduction PCA All parameters except svd_solver != 'full'. No limitations.
TSNE All parameters except metric != 'euclidean' or minkowski with p != 2. Sparse data is not supported.
Unsupervised NearestNeighbors All parameters except metric != 'euclidean' or minkowski with p != 2. Sparse data is not supported.
Other train_test_split All parameters are supported. Only dense data is supported.
assert_all_finite All parameters are supported. Only dense data is supported.
pairwise_distance With metric='cosine' and 'correlation'. Only dense data is supported.
roc_auc_score Parameters average, sample_weight, max_fpr and multi_class are not supported. No limitations.

⚠️ We support optimizations for the last four versions of scikit-learn. The latest release of Intel(R) Extension for Scikit-learn 2021.2.X supports scikit-learn 0.21.X, 0.22.X, 0.23.X and 0.24.X.

📜 Intel(R) Extension for Scikit-learn verbose

To find out which implementation of the algorithm is currently used (Intel(R) Extension for Scikit-learn or original Scikit-learn), set the environment variable:

  • On Linux and Mac OS: export SKLEARNEX_VERBOSE=INFO
  • On Windows: set SKLEARNEX_VERBOSE=INFO

For example, for DBSCAN you get one of these print statements depending on which implementation is used:

  • SKLEARNEX INFO: sklearn.cluster.DBSCAN.fit: running accelerated version on CPU
  • SKLEARNEX INFO: sklearn.cluster.DBSCAN.fit: fallback to original Scikit-learn

Read more in the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scikit_learn_intelex-2021.2.3-py38-none-win_amd64.whl (54.8 kB view details)

Uploaded Python 3.8Windows x86-64

scikit_learn_intelex-2021.2.3-py38-none-macosx_10_15_x86_64.whl (55.7 kB view details)

Uploaded Python 3.8macOS 10.15+ x86-64

scikit_learn_intelex-2021.2.3-py37-none-win_amd64.whl (54.8 kB view details)

Uploaded Python 3.7Windows x86-64

scikit_learn_intelex-2021.2.3-py37-none-macosx_10_15_x86_64.whl (55.7 kB view details)

Uploaded Python 3.7macOS 10.15+ x86-64

scikit_learn_intelex-2021.2.3-py36-none-win_amd64.whl (54.8 kB view details)

Uploaded Python 3.6Windows x86-64

scikit_learn_intelex-2021.2.3-py36-none-macosx_10_15_x86_64.whl (55.7 kB view details)

Uploaded Python 3.6macOS 10.15+ x86-64

File details

Details for the file scikit_learn_intelex-2021.2.3-py38-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py38-none-win_amd64.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 91bb785dc7a0b28b7b8388e4cc11098f8762350b85a59ceb36f356b34ee690ab
MD5 99c239173abf4b825dc3939d68a3c61d
BLAKE2b-256 0bcc46cf4151d23cfb3f34e8367be9363be3b4a78d70ccf058fcdfbb39d4b6c8

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py38-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 cd70d80c83180ec278d3c2b498e97ef0d6218281a9c09273497fd62f43dd58f2
MD5 2eb841286e5a0c15dd2729bd06d87293
BLAKE2b-256 3d86a9000328d535edea0287badf1a3987df1b75a5821d4da67a843ec57c237f

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py38-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py38-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 55.7 kB
  • Tags: Python 3.8, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py38-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4d2ff67299a94c93c04d269c23d8217e3ed08e3b4dead0a2aa38787ebd8075d4
MD5 ddf5912958286be976d6a36476e5f73e
BLAKE2b-256 14b2ecc3216bf454ef64a4b7f22aa7b5a76622c0ee61c125456ed2b9c85be278

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py37-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py37-none-win_amd64.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py37-none-win_amd64.whl
Algorithm Hash digest
SHA256 4be356f90a85ea4daf1019073dbcc1e951691f85a0931dc5dbae59797a327969
MD5 88ce50c9ac750c17cab386bdebb0afcc
BLAKE2b-256 f6bda808ebadd83317b1395867107450caac0a4035714e8b60fcc1962c3ffc77

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py37-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py37-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f6145918ca85f3e4a748d954af6260ac7866a062952dc42b1732b8b993c69254
MD5 5f00b0c2b6dc48c99f8c0a4ed526c6c3
BLAKE2b-256 f24b7b2bfe895dde2753ad1896475687855d71ae55a7d4f6e176d936d2519d88

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py37-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py37-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 55.7 kB
  • Tags: Python 3.7, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py37-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8e37b5c5efe3d2fc4ed74dcd9b9d8c2caca01418a9e76af5ffb590869dcdee49
MD5 00a14f725550e7bf994d836997978f75
BLAKE2b-256 f92d48f0b8953c4e1c8a02fe9fb510b1341fe7a0a76200f9a4658bb64aac99aa

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py36-none-win_amd64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py36-none-win_amd64.whl
  • Upload date:
  • Size: 54.8 kB
  • Tags: Python 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py36-none-win_amd64.whl
Algorithm Hash digest
SHA256 d26a849eedae052d41bb7f0848a5aad27a2180c94c2bed6c37aeb2d61ad0b552
MD5 78c22656cfcde6aab72ebad74e027979
BLAKE2b-256 cfc366d5586811b85091f94e303fa6c7d4419af38dce3bb36924dd20b147b263

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py36-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py36-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 86cd3cfd1717f552831763160d4305878072686f21ffd977782f2f221f0f1541
MD5 128693392174a39ff5b40947a9e085a7
BLAKE2b-256 ee389fe02d048e09938155c2e2f2a378be2d13aa217d4f62d28e04a5f8760067

See more details on using hashes here.

File details

Details for the file scikit_learn_intelex-2021.2.3-py36-none-macosx_10_15_x86_64.whl.

File metadata

  • Download URL: scikit_learn_intelex-2021.2.3-py36-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 55.7 kB
  • Tags: Python 3.6, macOS 10.15+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/2.7.9

File hashes

Hashes for scikit_learn_intelex-2021.2.3-py36-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6a5294299d4b102fea7674d26f704f10115914bc7e9b5af4d6e2210bd9be9353
MD5 7f2a7038ee2e09498c01658989ad74d0
BLAKE2b-256 667f7ffeb381f3f500ca9535460113eaf76473b4c97919a7986638422613e3db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page