Skip to main content

Intel(R) Extension for Scikit-learn* speeds up scikit-learn beyond by providing drop-in patching. Acceleration is achieved through the use of the Intel(R) oneAPI Data Analytics Library (oneDAL) that allows for fast usage of the framework suited for Data Scientists or Machine Learning users.

Project description

Intel(R) Extension for Scikit-learn*

Join the community on GitHub Discussions

Intel(R) Extension for Scikit-learn speeds up scikit-learn beyond by providing drop-in patching. Acceleration is achieved through the use of the Intel(R) oneAPI Data Analytics Library (oneDAL) that allows for fast usage of the framework suited for Data Scientists or Machine Learning users.

⚠️Intel(R) Extension for Scikit-learn contains scikit-learn patching functionality originally available in daal4py package. All future updates for the patching will be available in Intel(R) Extension for Scikit-learn only. Please use the package instead of daal4py.

Running full 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, and in Intel channel.

# PyPi (recommended by default)
pip install scikit-learn-intelex 
# 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: Intel channel

OS / Python version Python 3.6 Python 3.7 Python 3.8 Python 3.9
Linux [CPU, GPU]
Windows [CPU, GPU]
OsX [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)

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. 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 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:

  • INFO: sklearn.cluster.DBSCAN.fit: uses Intel(R) oneAPI Data Analytics Library solver
  • INFO: sklearn.cluster.DBSCAN.fit: uses original Scikit-learn solver

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.1-py38-none-win_amd64.whl (24.6 kB view details)

Uploaded Python 3.8Windows x86-64

scikit_learn_intelex-2021.2.1-py38-none-macosx_10_15_x86_64.whl (24.9 kB view details)

Uploaded Python 3.8macOS 10.15+ x86-64

scikit_learn_intelex-2021.2.1-py37-none-win_amd64.whl (24.6 kB view details)

Uploaded Python 3.7Windows x86-64

scikit_learn_intelex-2021.2.1-py37-none-macosx_10_15_x86_64.whl (24.9 kB view details)

Uploaded Python 3.7macOS 10.15+ x86-64

scikit_learn_intelex-2021.2.1-py36-none-win_amd64.whl (24.6 kB view details)

Uploaded Python 3.6Windows x86-64

scikit_learn_intelex-2021.2.1-py36-none-macosx_10_15_x86_64.whl (24.9 kB view details)

Uploaded Python 3.6macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py38-none-win_amd64.whl
  • Upload date:
  • Size: 24.6 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.1-py38-none-win_amd64.whl
Algorithm Hash digest
SHA256 e71d06259f8613ed7d9c1c8bb0ef07655234db153124cbcdb353e043b949fd9d
MD5 4860f7cfe6dc48fd6b5f1b33359264a0
BLAKE2b-256 5c4499613ec64e22bffed291cf8fe159a58d89a6b37c3146c8b0cb0683ba6663

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.1-py38-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0a3908924fbddc47de12bbd6eb3b6d2f74cd0d66fd01f4788eb5ee960178b18f
MD5 595d1ab11d87c9ae07c60c90297049bf
BLAKE2b-256 1e7c77fd0a6a0afa4ab285e78bb3e876fe81a02b7da707bacae1242258ae606b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py38-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 24.9 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.1-py38-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e57ec5b760bafae54f4be7a5c21326e8fea8fa2f32e6d25bda36320a90ed1e1e
MD5 562bf0879db8f90972f363a1b252dc86
BLAKE2b-256 d7afe7db92cb77e6cdbf5ad5fdc58bed8b7fa0b97008d548f7654b828fd5af58

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py37-none-win_amd64.whl
  • Upload date:
  • Size: 24.6 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.1-py37-none-win_amd64.whl
Algorithm Hash digest
SHA256 f17d1a81a133a81843977dad84b0427a0885c533417e187b504cc83f6713d2e3
MD5 ffbb760140793932c802b594a8b5fc26
BLAKE2b-256 ccf8c64f4c9d289908453f21d92417e9b810c4ece8b9ee8a356f0e03acff6792

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.1-py37-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8e75324b2cf951fa8cc518d36d5af856685ff6647bfe8d141d4c3e646d49aa8d
MD5 b929a6c217ebbf0c0dc8f5be62b15612
BLAKE2b-256 848da418d2ff7ab2f0e9ee0881c85020cde7d6a496957c621783c2405d038311

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py37-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 24.9 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.1-py37-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d20b7961741ddcfbeb2e02c3d13fcf0c8d6870af2ff9eb4896e6b953619793e3
MD5 9ed1a73b07e931e171638572290b4822
BLAKE2b-256 888a29f6307fa434ab9e322f6023309b99e495282575a25e75bd3b71efbd2e5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py36-none-win_amd64.whl
  • Upload date:
  • Size: 24.6 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.1-py36-none-win_amd64.whl
Algorithm Hash digest
SHA256 d212e8de624b24bf2bbb30034441a9870749b88054137ef3b4fe58e4b1543172
MD5 eab03bf098b7cc16f7bb27d6d2130bce
BLAKE2b-256 572cc683e3551d23130d6492913f837fc1823bc3d19aee72939c6d13f2afc9b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for scikit_learn_intelex-2021.2.1-py36-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 49765ef3452a054711e2d37b9e070f87f33f6a3734083556cdbbddebf7612bd8
MD5 16a5f485520cceb51e9e4ad58cc6ddf9
BLAKE2b-256 5f600fe0266226bbff2dd5ab8469b46435636823dd01922fa7d024c6a829a702

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scikit_learn_intelex-2021.2.1-py36-none-macosx_10_15_x86_64.whl
  • Upload date:
  • Size: 24.9 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.1-py36-none-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 27e46c3750d0122c3665c733e8eced6372374edb8875490728346444b0a8b5d1
MD5 0337cdce8956c2f65f5728946af6eeb6
BLAKE2b-256 a7c37d6952edf6035eaee8f52b409b8f3183f16234d4ad211a2357fb371bdde3

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