Preview Functionality
Some of implemented functionality in Extension for Scikit-learn* doesn’t meet one or few of next requirements for being enabled by default for all users:
The functionality API is not stable and can be changed in future
The functionality doesn’t have full compatibility with stock Scikit-learn
The functionality misses performance targets compared to stock Scikit-learn or previously available version of functionality
The functionality is not fully tested
This type of functionality is available under preview mode of Extension for Scikit-learn* and located in
the corresponding module (sklearnex.preview
).
Functionalities under preview will be made available after patching when preview mode is enabled, but note that some might be extension estimators without analogs in scikit-learn.
To enable preview functionality, you need to set the SKLEARNEX_PREVIEW
environment variable
to non-empty value before patching of Scikit-learn.
For example, you can set the environment variable in the following way:
On Linux* OS
export SKLEARNEX_PREVIEW=1
On Windows* OS
set SKLEARNEX_PREVIEW=1
Then, you can import Scikit-learn estimator patched with a preview one from sklearnex.preview
module:
from sklearnex import patch_sklearn
patch_sklearn()
from sklearn.decomposition import IncrementalPCA
print(IncrementalPCA.__module__)
# output:
# sklearnex.preview.decomposition.incremental_pca
Current list of preview estimators:
Estimator name |
Module |
Is patching supported |
---|---|---|
EmpiricalCovariance |
sklearnex.preview.covariance |
Yes |
IncrementalPCA |
sklearnex.preview.decomposition |
Yes |