diff --git a/.ci/scripts/install_windows.bat b/.ci/scripts/install_windows.bat index f7c19d77f3..b954052174 100644 --- a/.ci/scripts/install_windows.bat +++ b/.ci/scripts/install_windows.bat @@ -1,6 +1,16 @@ -REM SPDX-FileCopyrightText: 2020 Intel Corporation -REM -REM SPDX-License-Identifier: MIT +rem Copyright 2020 Intel Corporation +rem +rem Licensed under the Apache License, Version 2.0 (the "License"); +rem you may not use this file except in compliance with the License. +rem You may obtain a copy of the License at +rem +rem http://www.apache.org/licenses/LICENSE-2.0 +rem +rem Unless required by applicable law or agreed to in writing, software +rem distributed under the License is distributed on an "AS IS" BASIS, +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +rem See the License for the specific language governing permissions and +rem limitations under the License. set URL=%1 set COMPONENTS=%2 diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml new file mode 100644 index 0000000000..0f8a26a8c1 --- /dev/null +++ b/.github/.licenserc.yaml @@ -0,0 +1,68 @@ +# Copyright 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +header: + license: + spdx-id: Apache-2.0 + copyright-owner: Intel Corporation + pattern: | + (Copyright \d{4} Intel Corporation|Copyright contributors to the oneDAL project|Copyright \d{4} Fujitsu Limited) + + Licensed under the Apache License, Version 2\.0 \(the "License"\); + you may not use this file except in compliance with the License\. + You may obtain a copy of the License at + + http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\. + See the License for the specific language governing permissions and + limitations under the License\. + paths: + - '**' + + paths-ignore: + - '.gitignore' + - '.gitattributes' + # Empty __init__.py files + - 'daal4py/sklearn/monkeypatch/__init__.py' + - 'generator/__init__.py' + # Clang-format configs + - '.clang-format' + - '_clang-format' + # All .csv and .ipynb files + - '**/*.csv' + - '**/*.ipynb' + # Something in doc/ + - 'doc/daal4py/_static/style.css' + - 'doc/daal4py/_templates/layout.html' + - 'doc/sources/_static/style.css' + - 'doc/sources/_templates/footer.html' + - 'doc/sources/_templates/layout.html' + - 'doc/daal4py/third-party-programs.txt' + - 'doc/third-party-programs-sklearnex.txt' + # requirements + - 'dependencies-dev' + - 'requirements*.txt' + # Some files from .ci/.github + - '.github/CODEOWNERS' + - '.github/renovate.json' + # Specific files + - 'setup.cfg' + - 'LICENSE' + + comment: on-failure + + license-location-threshold: 80 # specifies the index threshold where the license header can be located. diff --git a/.github/ISSUE_TEMPLATE/-bug_report.md b/.github/ISSUE_TEMPLATE/-bug_report.md index d008668bb8..af95855314 100644 --- a/.github/ISSUE_TEMPLATE/-bug_report.md +++ b/.github/ISSUE_TEMPLATE/-bug_report.md @@ -1,3 +1,19 @@ + + --- name: " Bug_report" about: Create a report to help us improve diff --git a/.github/Pull_Request_template.md b/.github/Pull_Request_template.md index 8d554abb77..a97cf102bc 100644 --- a/.github/Pull_Request_template.md +++ b/.github/Pull_Request_template.md @@ -1,3 +1,19 @@ + + ## Description _Add a comprehensive description of proposed changes_ diff --git a/.github/issue_template/Bug_report.md b/.github/issue_template/Bug_report.md index 61be954108..457ef6db73 100644 --- a/.github/issue_template/Bug_report.md +++ b/.github/issue_template/Bug_report.md @@ -1,3 +1,19 @@ + + --- name: Bug report about: Create a report to help us improve diff --git a/.github/workflows/renovate-validation.yml b/.github/workflows/renovate-validation.yml index 0a4d12fb94..0916ce1bc6 100644 --- a/.github/workflows/renovate-validation.yml +++ b/.github/workflows/renovate-validation.yml @@ -1,3 +1,19 @@ +#=============================================================================== +# Copyright 2021 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#=============================================================================== + name: renovate-validation on: diff --git a/.github/workflows/skywalking-eyes.yml b/.github/workflows/skywalking-eyes.yml new file mode 100644 index 0000000000..932490c0ca --- /dev/null +++ b/.github/workflows/skywalking-eyes.yml @@ -0,0 +1,33 @@ +name: Check License Header + +on: + pull_request: + branches: + - main + push: + branches: + - main + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + check-license-header: + name: Copyright Check + if: github.event.repository.fork == false + runs-on: ubuntu-24.04 + permissions: + issues: write + pull-requests: write + steps: + - name: "Checkout code" + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: "Run check" + uses: apache/skywalking-eyes/header@cd7b195c51fd3d6ad52afceb760719ddc6b3ee91 # v0.6.0 + with: + config: ".github/.licenserc.yaml" + mode: "check" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6ffa9221d8..1ad20877e1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,19 @@ + + # Contributor Covenant Code of Conduct ## Our Pledge diff --git a/README.md b/README.md index e6ac933e58..69c213ed99 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,23 @@ + +
-# Intel(R) Extension for Scikit-learn* +# Intel(R) Extension for Scikit-learn*

Speed up your scikit-learn applications for Intel(R) CPUs and GPUs across single- and multi-node configurations @@ -35,7 +51,7 @@ With Intel(R) Extension for Scikit-learn, you can: * Continue to use the open-source scikit-learn API * Enable and disable the extension with a couple of lines of code or at the command line -Intel(R) Extension for Scikit-learn is also a part of [Intel(R) AI Tools](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html). +Intel(R) Extension for Scikit-learn is also a part of [Intel(R) AI Tools](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html). ## Acceleration @@ -91,7 +107,7 @@ See all installation instructions in the [Installation Guide](https://intel.gith The software acceleration is achieved through patching. It means, replacing the stock scikit-learn algorithms with their optimized versions provided by the extension. The patching only affects [supported algorithms and their parameters](https://intel.github.io/scikit-learn-intelex/latest/algorithms.html). -You can still use not supported ones in your code, the package simply fallbacks into the stock version of scikit-learn. +You can still use not supported ones in your code, the package simply fallbacks into the stock version of scikit-learn. > **_TIP:_** Enable [verbose mode](https://intel.github.io/scikit-learn-intelex/latest/verbose.html) to see which implementation of the algorithm is currently used. @@ -106,7 +122,7 @@ To patch scikit-learn, you can: patch_sklearn() ``` -:eyes: Read about [other ways to patch scikit-learn](https://intel.github.io/scikit-learn-intelex/index.html#usage). +:eyes: Read about [other ways to patch scikit-learn](https://intel.github.io/scikit-learn-intelex/index.html#usage). ## Documentation @@ -134,5 +150,5 @@ The acceleration is achieved through the use of the Intel(R) oneAPI Data Analyti We welcome community contributions, check our [Contributing Guidelines](https://github.com/intel/scikit-learn-intelex/blob/master/CONTRIBUTING.md) to learn more. ------------------------------------------------------------------------ -\* The Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others. +\* The Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others. diff --git a/daal4py/README.md b/daal4py/README.md index a352e21011..51d454c619 100755 --- a/daal4py/README.md +++ b/daal4py/README.md @@ -1,3 +1,19 @@ + + # daal4py - A Convenient Python API to the Intel(R) oneAPI Data Analytics Library [![Build Status](https://dev.azure.com/daal/daal4py/_apis/build/status/CI?branchName=main)](https://dev.azure.com/daal/daal4py/_build/latest?definitionId=9&branchName=main) [![Coverity Scan Build Status](https://scan.coverity.com/projects/21716/badge.svg)](https://scan.coverity.com/projects/daal4py) diff --git a/doc/daal4py/algorithms.rst b/doc/daal4py/algorithms.rst index f0d8e7ef3c..f69c9b1382 100755 --- a/doc/daal4py/algorithms.rst +++ b/doc/daal4py/algorithms.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ########## Algorithms diff --git a/doc/daal4py/contents.rst b/doc/daal4py/contents.rst index c98075f365..c862c4ac2c 100644 --- a/doc/daal4py/contents.rst +++ b/doc/daal4py/contents.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _contents: @@ -21,7 +19,7 @@ Contents ######## .. include:: note.rst - + .. toctree:: :maxdepth: 2 :caption: Contents: diff --git a/doc/daal4py/data.rst b/doc/daal4py/data.rst index 28c5473349..68232acb79 100644 --- a/doc/daal4py/data.rst +++ b/doc/daal4py/data.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _data: @@ -21,7 +19,7 @@ Input Data ########## .. include:: note.rst - + All array arguments to compute functions and to algorithm constructors can be provided in different formats. daal4py will automatically do its best to work on the provided data with minimal overhead, most notably without copying the data. diff --git a/doc/daal4py/examples.rst b/doc/daal4py/examples.rst index 181b2c50ab..19c9431864 100755 --- a/doc/daal4py/examples.rst +++ b/doc/daal4py/examples.rst @@ -1,25 +1,23 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ########## Examples ########## .. include:: note.rst - + Below are examples on how to utilize daal4py for various usage styles. General usage diff --git a/doc/daal4py/index.rst b/doc/daal4py/index.rst index f558717133..ea1955f726 100644 --- a/doc/daal4py/index.rst +++ b/doc/daal4py/index.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _index: diff --git a/doc/daal4py/model-builders.rst b/doc/daal4py/model-builders.rst index 55dc292ef4..922ff04735 100644 --- a/doc/daal4py/model-builders.rst +++ b/doc/daal4py/model-builders.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2023 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2023 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _model-builders: @@ -39,7 +37,7 @@ for the best performance on the Intel(R) Architecture. .. note:: Currently, experimental support for XGBoost* and LightGBM* categorical data is not supported. - For the model conversion to work with daal4py, convert non-numeric data to numeric data + For the model conversion to work with daal4py, convert non-numeric data to numeric data before training and converting the model. Conversion @@ -90,7 +88,7 @@ For these models, the ``predict()`` method takes additional keyword arguments: The returned prediction has the shape: - * ``(n_rows, n_features + 1)`` for SHAP contributions + * ``(n_rows, n_features + 1)`` for SHAP contributions * ``(n_rows, n_features + 1, n_features + 1)`` for SHAP interactions Here, ``n_rows`` is the number of rows (i.e., observations) in ``test_data``, and ``n_features`` is the number of features in the dataset. diff --git a/doc/daal4py/note.rst b/doc/daal4py/note.rst index f22445eb1c..b5b998a662 100644 --- a/doc/daal4py/note.rst +++ b/doc/daal4py/note.rst @@ -1,20 +1,18 @@ -.. ****************************************************************************** -.. * Copyright 2023 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2023 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _note: -.. note:: Scikit-learn patching functionality in daal4py was deprecated and moved to a separate package, `Intel(R) Extension for Scikit-learn* `_. +.. note:: Scikit-learn patching functionality in daal4py was deprecated and moved to a separate package, `Intel(R) Extension for Scikit-learn* `_. All future patches will be available only in Intel(R) Extension for Scikit-learn*. Use the scikit-learn-intelex package instead of daal4py for the scikit-learn acceleration. diff --git a/doc/daal4py/scaling.rst b/doc/daal4py/scaling.rst index 824b8c815a..0af1d0c25e 100644 --- a/doc/daal4py/scaling.rst +++ b/doc/daal4py/scaling.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _distributed: diff --git a/doc/daal4py/sklearn.rst b/doc/daal4py/sklearn.rst index 2693889b84..9cf6a83d8a 100755 --- a/doc/daal4py/sklearn.rst +++ b/doc/daal4py/sklearn.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _sklearn: diff --git a/doc/daal4py/streaming.rst b/doc/daal4py/streaming.rst index f29562453d..3b80abbc51 100644 --- a/doc/daal4py/streaming.rst +++ b/doc/daal4py/streaming.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _streaming: @@ -21,7 +19,7 @@ Streaming Data ############## .. include:: note.rst - + For large quantities of data it might be impossible to provide all input data at once. This might be because the data resides in multiple files and merging it is to costly (or not feasible in other ways). In other cases the data is simply too diff --git a/doc/sources/404.rst b/doc/sources/404.rst index 3060a3f9cc..f3e2906724 100644 --- a/doc/sources/404.rst +++ b/doc/sources/404.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2022 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2022 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. :orphan: :nosearch: diff --git a/doc/sources/algorithms.rst b/doc/sources/algorithms.rst index 4d165c1910..42a5906277 100755 --- a/doc/sources/algorithms.rst +++ b/doc/sources/algorithms.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _sklearn_algorithms: @@ -50,12 +48,12 @@ Classification - ``criterion`` != `'gini'` - Multi-output and sparse data are not supported * - `KNeighborsClassifier` - - + - - For ``algorithm`` == `'kd_tree'`: - + all parameters except ``metric`` != `'euclidean'` or `'minkowski'` with ``p`` != `2` - For ``algorithm`` == `'brute'`: - + all parameters except ``metric`` not in [`'euclidean'`, `'manhattan'`, `'minkowski'`, `'chebyshev'`, `'cosine'`] - Multi-output and sparse data are not supported * - `LogisticRegression` @@ -182,12 +180,12 @@ Nearest Neighbors - Parameters - Data formats * - `NearestNeighbors` - - + - - For ``algorithm`` == 'kd_tree': - + all parameters except ``metric`` != `'euclidean'` or `'minkowski'` with ``p`` != `2` - For ``algorithm`` == 'brute': - + all parameters except ``metric`` not in [`'euclidean'`, `'manhattan'`, `'minkowski'`, `'chebyshev'`, `'cosine'`] - Sparse data is not supported @@ -213,12 +211,12 @@ Other Tasks - Only dense data is supported * - `pairwise_distance` - All parameters are supported except: - + - ``metric`` not in [`'cosine'`, `'correlation'`] - Only dense data is supported * - `roc_auc_score` - All parameters are supported except: - + - ``average`` != `None` - ``sample_weight`` != `None` - ``max_fpr`` != `None` @@ -344,7 +342,7 @@ Dimensionality Reduction - Data formats * - `PCA` - All parameters are supported except: - + - ``svd_solver`` not in [`'full'`, `'covariance_eigh'`] - Sparse data is not supported @@ -496,7 +494,7 @@ Dimensionality Reduction - Data formats * - `PCA` - All parameters are supported except: - + - ``svd_solver`` not in [`'full'`, `'covariance_eigh'`] - ``fit`` is the only method supported - Sparse data is not supported diff --git a/doc/sources/array_api.rst b/doc/sources/array_api.rst index 4c71e0cb88..25344bf4fe 100644 --- a/doc/sources/array_api.rst +++ b/doc/sources/array_api.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2024 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2024 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _array_api: diff --git a/doc/sources/blogs.rst b/doc/sources/blogs.rst index 2d9b0024e5..55b330637f 100644 --- a/doc/sources/blogs.rst +++ b/doc/sources/blogs.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _blogs: diff --git a/doc/sources/contribute.rst b/doc/sources/contribute.rst index 28283bd9d8..d69fbe94cd 100644 --- a/doc/sources/contribute.rst +++ b/doc/sources/contribute.rst @@ -1,24 +1,22 @@ -.. ****************************************************************************** -.. * Copyright 2022 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2022 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ################## How to Contribute ################## -As an open source project, we welcome community contributions to Intel(R) Extension for Scikit-learn. +As an open source project, we welcome community contributions to Intel(R) Extension for Scikit-learn. This document explains how to participate in project conversations, log bugs and enhancement requests, and submit code patches. Licensing @@ -49,7 +47,7 @@ Continuous Integration (CI) testing is enabled for the repository. Your pull req Code Style ------------------- -We use `black `_ and `isort `_ formatters for Python* code. +We use `black `_ and `isort `_ formatters for Python* code. The line length is 90 characters; use default options otherwise. You can find the linter configuration in `.pyproject.toml `_. A GitHub* Action verifies if your changes comply with the output of the auto-formatting tools. diff --git a/doc/sources/deprecation.rst b/doc/sources/deprecation.rst index 5bc3f3fd19..2ae9305740 100644 --- a/doc/sources/deprecation.rst +++ b/doc/sources/deprecation.rst @@ -1,30 +1,28 @@ -.. ****************************************************************************** -.. * Copyright 2023 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2023 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. Deprecation Notice ================== -This page provides information about the deprecations of a specific |intelex| functionality. +This page provides information about the deprecations of a specific |intelex| functionality. macOS* Support ************** -**Deprecation:** macOS* support is deprecated for |intelex|. The 2023.x releases are the last to provide it. +**Deprecation:** macOS* support is deprecated for |intelex|. The 2023.x releases are the last to provide it. **Reasons for deprecation:** No modern X86 macOS*-based systems are to be released. -**Alternatives:** The 2023.x version on macOS*. +**Alternatives:** The 2023.x version on macOS*. diff --git a/doc/sources/distributed-mode.rst b/doc/sources/distributed-mode.rst index cfeee2c611..faab8b9d2b 100644 --- a/doc/sources/distributed-mode.rst +++ b/doc/sources/distributed-mode.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _distributed: @@ -20,33 +18,33 @@ Distributed Mode ================ |intelex| offers Single Program, Multiple Data (SPMD) supported interfaces for distributed computing. -Several `GPU-supported algorithms `_ -also provide distributed, multi-GPU computing capabilities via integration with ``mpi4py``. The prerequisites -match those of GPU computing, along with an MPI backend of your choice (`Intel MPI recommended -`_, available -via ``impi-devel`` python package) and the ``mpi4py`` python package. If using |intelex| +Several `GPU-supported algorithms `_ +also provide distributed, multi-GPU computing capabilities via integration with ``mpi4py``. The prerequisites +match those of GPU computing, along with an MPI backend of your choice (`Intel MPI recommended +`_, available +via ``impi-devel`` python package) and the ``mpi4py`` python package. If using |intelex| `installed from sources `_, ensure that the spmd_backend is built. -Note that |intelex| now supports GPU offloading to speed up MPI operations. This is supported automatically with +Note that |intelex| now supports GPU offloading to speed up MPI operations. This is supported automatically with some MPI backends, but in order to use GPU offloading with Intel MPI, set the following environment variable (providing data on device without this may lead to a runtime error): - + :: export I_MPI_OFFLOAD=1 -Estimators can be imported from the ``sklearnex.spmd`` module. Data should be distributed across multiple nodes as -desired, and should be transfered to a dpctl or dpnp array before being passed to the estimator. View a full -example of this process in the |intelex| repository, where many examples of our SPMD-supported estimators are +Estimators can be imported from the ``sklearnex.spmd`` module. Data should be distributed across multiple nodes as +desired, and should be transfered to a dpctl or dpnp array before being passed to the estimator. View a full +example of this process in the |intelex| repository, where many examples of our SPMD-supported estimators are available: https://github.com/intel/scikit-learn-intelex/blob/main/examples/sklearnex/. To run: :: mpirun -n 4 python linear_regression_spmd.py -Note that additional mpirun arguments can be added as desired. SPMD-supported estimators are listed in the +Note that additional mpirun arguments can be added as desired. SPMD-supported estimators are listed in the `algorithms support documentation `_. -Additionally, daal4py offers some distributed functionality, see +Additionally, daal4py offers some distributed functionality, see `documentation `_ for further details. diff --git a/doc/sources/guide/acceleration.rst b/doc/sources/guide/acceleration.rst index 952ee73539..3b7b662080 100644 --- a/doc/sources/guide/acceleration.rst +++ b/doc/sources/guide/acceleration.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2022 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2022 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ######################## Tuning Guide diff --git a/doc/sources/index.rst b/doc/sources/index.rst index 4663cd1d5b..d66686aa28 100755 --- a/doc/sources/index.rst +++ b/doc/sources/index.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. |intelex_repo| replace:: |intelex| repository .. _intelex_repo: https://github.com/intel/scikit-learn-intelex @@ -43,13 +41,13 @@ Intel(R) Extension for Scikit-learn is also a part of `Intel(R) AI Tools `_. +These performance charts use benchmarks that you can find in the `scikit-learn bench repository `_. -Supported Algorithms +Supported Algorithms --------------------- -See all of the :ref:`sklearn_algorithms`. +See all of the :ref:`sklearn_algorithms`. Intel(R) Optimizations @@ -96,7 +94,7 @@ Enable Intel(R) GPU optimizations quick-start.rst samples.rst kaggle.rst - + .. toctree:: :caption: Developer Guide :hidden: @@ -111,7 +109,7 @@ Enable Intel(R) GPU optimizations verbose.rst preview.rst deprecation.rst - + .. toctree:: :caption: Performance @@ -121,7 +119,7 @@ Enable Intel(R) GPU optimizations guide/acceleration.rst .. toctree:: - :caption: Learn + :caption: Learn :hidden: :maxdepth: 2 @@ -132,7 +130,7 @@ Enable Intel(R) GPU optimizations :caption: More :hidden: :maxdepth: 2 - + Support contribute.rst license.rst diff --git a/doc/sources/input-types.rst b/doc/sources/input-types.rst index cd1714feb8..a0781119c9 100644 --- a/doc/sources/input-types.rst +++ b/doc/sources/input-types.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2024 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2024 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _input_types: diff --git a/doc/sources/kaggle.rst b/doc/sources/kaggle.rst index 364ab723d1..6f704289bc 100644 --- a/doc/sources/kaggle.rst +++ b/doc/sources/kaggle.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _kaggle: diff --git a/doc/sources/kaggle/automl.rst b/doc/sources/kaggle/automl.rst index 0156e5ec89..2663010481 100644 --- a/doc/sources/kaggle/automl.rst +++ b/doc/sources/kaggle/automl.rst @@ -1,20 +1,18 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ - -.. |automl_with_intelex_jun| replace:: AutoML MultiClass Classification (Gradient Boosting, Random Forest, kNN) using AutoGluon with |intelex| +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. + +.. |automl_with_intelex_jun| replace:: AutoML MultiClass Classification (Gradient Boosting, Random Forest, kNN) using AutoGluon with |intelex| .. _automl_with_intelex_jun: https://www.kaggle.com/alex97andreev/tps-jun-autogluon-with-sklearnex .. |automl_with_intelex_tps_oct| replace:: AutoML Binary Classification (Gradient Boosting, Random Forest) using AutoGluon with |intelex| diff --git a/doc/sources/kaggle/classification.rst b/doc/sources/kaggle/classification.rst index c0176cab62..a017af2bd5 100644 --- a/doc/sources/kaggle/classification.rst +++ b/doc/sources/kaggle/classification.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. Kaggle Kernels for Classification Tasks *************************************** @@ -35,11 +33,11 @@ Binary Classification - Content * - `Logistic Regression for Binary Classification `_ - + **Data:** [TPS Nov 2021] Synthetic spam emails data - Identify spam emails via features extracted from the email - - + - - data preprocessing (normalization) - search for optimal parameters using Optuna @@ -47,23 +45,23 @@ Binary Classification - performance comparison to scikit-learn * - `Feature Importance in Random Forest for Binary Classification `_ - + **Data:** [TPS Nov 2021] Synthetic spam emails data - Identify spam emails via features extracted from the email - - - + - + - reducing DataFrame memory usage - computing feature importance with ELI5 and the default scikit-learn permutation importance - training using scikit-learn-intelex - performance comparison to scikit-learn * - `Random Forest for Binary Classification `_ - + **Data:** [TPS Apr 2021] Synthetic data based on Titanic dataset - Predict whether a passenger survivies - - - + - + - data preprocessing - feature construction - search for optimal parameters using Optuna @@ -71,21 +69,21 @@ Binary Classification - performance comparison to scikit-learn * - `Support Vector Classification (SVC) for Binary Classification `_ - + **Data:** [TPS Apr 2021] Synthetic data based on Titanic dataset - Predict whether a passenger survivies - - - + - + - data preprocessing - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn * - `Support Vector Classification (SVC) with Feature Preprocessing for Binary Classification `_ - + **Data:** [TPS Apr 2021] Synthetic data based on Titanic dataset - Predict whether a passenger survivies - - - + - + - data preprocessing - feature engineering - training and prediction using scikit-learn-intelex @@ -104,10 +102,10 @@ MultiClass Classification - Content * - `Logistic Regression for MultiClass Classification with Quantile Transformer `_ - + **Data:** [TPS Jun 2021] Synthetic eCommerce data - Predict the category of an eCommerce product - - + - - data preprocessing with Quantile Transformer - training and prediction using scikit-learn-intelex @@ -115,19 +113,19 @@ MultiClass Classification - performance comparison to scikit-learn * - `Support Vector Classification (SVC) for MultiClass Classification (example 1) `_ - + **Data:** [TPS May 2021] Synthetic eCommerce data - Predict the category of an eCommerce product - - + - - data preprocessing - training and prediction using scikit-learn-intelex * - `Stacking Classifer with Logistic Regression, kNN, Random Forest, and Quantile Transformer `_ - + **Data:** [TPS Jun 2021] Synthetic eCommerce data - Predict the category of an eCommerce product - - + - - data preprocessing: one-hot encoding, dimensionality reduction with PCA, normalization - creating a stacking classifier with logistic regression, kNN, and random forest, @@ -137,31 +135,31 @@ MultiClass Classification - performance comparison to scikit-learn * - `Support Vector Classification (SVC) for MultiClass Classification (example 2) `_ - + **Data:** [TPS Dec 2021] Synthetic Forest Cover Type data - Predict the forest cover type - - + - - data preprocessing - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn * - `Feature Importance in Random Forest for MultiClass Classification `_ - + **Data:** [TPS Dec 2021] Synthetic Forest Cover Type data - Predict the forest cover type - - - + - + - reducing DataFrame memory usage - computing feature importance with ELI5 - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn * - `k-Nearest Neighbors (kNN) for MultiClass Classification `_ - + **Data:** [TPS Feb 2022] Bacteria DNA - Predict bacteria species based on repeated lossy measurements of DNA snippets - - + - - data preprocessing - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn @@ -179,21 +177,21 @@ Classification Tasks in Computer Vision - Content * - `Support Vector Classification (SVC) for MultiClass Classification (CV task) `_ - + **Data:** Digit Recognizer (MNIST) - Recognize hand-written digits - - - + - + - data preprocessing - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn * - `k-Nearest Neighbors (kNN) for MultiClass Classification (CV task) `_ - + **Data:** Digit Recognizer (MNIST) - Recognize hand-written digits - - - + - + - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn @@ -210,11 +208,11 @@ Classification Tasks in Natural Language Processing - Content * - `Support Vector Classification (SVC) for a Binary Classification (NLP task) `_ - + **Data:** Natural Language Processing with Disaster Tweets - Predict which tweets are about real disasters and which ones are not - - - + - + - data preprocessing - TF-IDF calculation - search for optimal paramters using Optuna @@ -222,21 +220,21 @@ Classification Tasks in Natural Language Processing - performance comparison to scikit-learn * - `One-vs-Rest Support Vector Machine (SVM) with Text Data for MultiClass Classification `_ - + **Data:** What's Cooking - Use recipe ingredients to predict the cuisine - - - + - + - feature extraction using TfidfVectorizer - training and prediction using scikit-learn-intelex - performance comparison to scikit-learn * - `Support Vector Classification (SVC) for Binary Classification with Sparse Data (NLP task) `_ - + **Data:** Stack Overflow questions - Predict the binary quality rating for Stack Overflow questions - - - + - + - data preprocessing - TF-IDF calculation - search for optimal paramters using Optuna diff --git a/doc/sources/kaggle/note-about-tps.rst b/doc/sources/kaggle/note-about-tps.rst index 692c6a3d0e..2e53d54afe 100644 --- a/doc/sources/kaggle/note-about-tps.rst +++ b/doc/sources/kaggle/note-about-tps.rst @@ -1,17 +1,15 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. TPS stands for Tabular Playground Series, which is a series of beginner-friendly Kaggle competitions. diff --git a/doc/sources/kaggle/regression.rst b/doc/sources/kaggle/regression.rst index abdbebc15b..3bd555c1c4 100644 --- a/doc/sources/kaggle/regression.rst +++ b/doc/sources/kaggle/regression.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. Kaggle Kernels for Regression Tasks ************************************ @@ -35,17 +33,17 @@ Using a Single Regressor - Content * - `Baseline Nu Support Vector Regression (nuSVR) with RBF Kernel `_ - + **Data:** [TPS Jul 2021] Synthetic pollution data - Predict air pollution measurements over time based on weather and input values from multiple sensors - - + - - data preprocessing - search for optimal paramters using Optuna - training and prediction using scikit-learn-intelex * - `Nu Support Vector Regression (nuSVR) `__ - + **Data:** [TPS Aug 2021] Synthetic loan data - Calculate loss associated with a loan defaults - @@ -57,7 +55,7 @@ Using a Single Regressor * - `Nu Support Vector Regression (nuSVR) `__ - + **Data:** House Prices dataset - Predict sale prices for a property based on its characteristics - @@ -71,10 +69,10 @@ Using a Single Regressor - performance comparison to scikit-learn * - `Random Forest Regression `_ - + **Data:** [TPS Jul 2021] Synthetic pollution data - Predict air pollution measurements over time based on weather and input values from multiple sensors - - + - - checking correlation between features - search for best paramters using GridSearchCV @@ -83,10 +81,10 @@ Using a Single Regressor * - `Random Forest Regression with Feature Engineering `_ - + **Data:** [TPS Jul 2021] Synthetic pollution data - Predict air pollution measurements over time based on weather and input values from multiple sensors - - + - - data preprocessing - feature engineering @@ -106,8 +104,8 @@ Using a Single Regressor - performance comparison to scikit-learn * - `Ridge Regression `_ - - + + **Data:** [TPS Sep 2021] Synthetic insurance data - Predict the probability of a customer making a claim upon an insurance policy - @@ -131,10 +129,10 @@ Stacking Regressors - Content * - `Stacking Regressor with Random Fores, SVR, and LASSO `_ - + **Data:** [TPS Jul 2021] Synthetic pollution data - Predict air pollution measurements over time based on weather and input values from multiple sensors - - + - - feature engineering - creating a stacking regressor @@ -144,7 +142,7 @@ Stacking Regressors * - `Stacking Regressor with ElasticNet, LASSO, and Ridge Regression for Time-series data `_ - + **Data:** Predict Future Sales dataset - Predict total sales for every product and store in the next month based on daily sales data - diff --git a/doc/sources/license.rst b/doc/sources/license.rst index df68abaea6..16a0cb9fe4 100644 --- a/doc/sources/license.rst +++ b/doc/sources/license.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2023 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2023 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _license: diff --git a/doc/sources/non-scikit-algorithms.rst b/doc/sources/non-scikit-algorithms.rst index 620461843f..3e0c33e810 100644 --- a/doc/sources/non-scikit-algorithms.rst +++ b/doc/sources/non-scikit-algorithms.rst @@ -1,22 +1,20 @@ -.. ****************************************************************************** -.. * Copyright 2024 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2024 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. Non-Scikit-Learn Algorithms =========================== -Algorithms not presented in the original scikit-learn are described here. All algorithms are +Algorithms not presented in the original scikit-learn are described here. All algorithms are available for both CPU and GPU (including distributed mode) BasicStatistics diff --git a/doc/sources/oneapi-gpu.rst b/doc/sources/oneapi-gpu.rst index 37bfbf3a92..f9808f97e4 100644 --- a/doc/sources/oneapi-gpu.rst +++ b/doc/sources/oneapi-gpu.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _oneapi_gpu: @@ -64,16 +62,16 @@ specific device with the help of dpctl: :code:`usm_ndarray`. The algorithms from the stock version of scikit-learn do not support this feature. - Use global configurations of |intelex|\*: - + 1. The :code:`target_offload` option can be used to set the device primarily used to perform computations. Accepted data types are :code:`str` and :code:`dpctl.SyclQueue`. If you pass a string to :code:`target_offload`, it should either be ``"auto"``, which means that the execution context is deduced from the location of input data, or a string with SYCL* filter selector. The default value is ``"auto"``. - + 2. The :code:`allow_fallback_to_host` option - is a Boolean flag. If set to :code:`True`, the computation is allowed + is a Boolean flag. If set to :code:`True`, the computation is allowed to fallback to the host device when a particular estimator does not support the selected device. The default value is :code:`False`. diff --git a/doc/sources/patching/patch-kmeans-example.rst b/doc/sources/patching/patch-kmeans-example.rst index c6324bbb11..555e479faa 100644 --- a/doc/sources/patching/patch-kmeans-example.rst +++ b/doc/sources/patching/patch-kmeans-example.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. :: diff --git a/doc/sources/patching/patch-one-algorithm.rst b/doc/sources/patching/patch-one-algorithm.rst index 2191b79cb4..7216e1a417 100644 --- a/doc/sources/patching/patch-one-algorithm.rst +++ b/doc/sources/patching/patch-one-algorithm.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. :: diff --git a/doc/sources/patching/patch-several-algorithms.rst b/doc/sources/patching/patch-several-algorithms.rst index 2709497127..32527dc5aa 100644 --- a/doc/sources/patching/patch-several-algorithms.rst +++ b/doc/sources/patching/patch-several-algorithms.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. :: diff --git a/doc/sources/patching/patching-options.rst b/doc/sources/patching/patching-options.rst index 5705a43ca0..99aa270ad7 100644 --- a/doc/sources/patching/patching-options.rst +++ b/doc/sources/patching/patching-options.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. important:: diff --git a/doc/sources/patching/undo-patch.rst b/doc/sources/patching/undo-patch.rst index 5692a76c7b..db356d84a5 100644 --- a/doc/sources/patching/undo-patch.rst +++ b/doc/sources/patching/undo-patch.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. :: diff --git a/doc/sources/quick-start.rst b/doc/sources/quick-start.rst index bc6ac8798a..e2ac194b65 100644 --- a/doc/sources/quick-start.rst +++ b/doc/sources/quick-start.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. |intelex_repo| replace:: |intelex| repository .. _intelex_repo: https://github.com/intel/scikit-learn-intelex @@ -21,7 +19,7 @@ Quick Start #################### -Get ready to elevate your scikit-learn code with |intelex| and experience the benefits of accelerated performance in just a few simple steps. +Get ready to elevate your scikit-learn code with |intelex| and experience the benefits of accelerated performance in just a few simple steps. Compatibility with Scikit-learn* --------------------------------- @@ -31,15 +29,15 @@ Intel(R) Extension for Scikit-learn is compatible with the last four versions of Integrate |intelex| -------------------- -Patching +Patching ********************** -Once you install Intel*(R) Extension for Scikit-learn*, you replace algorithms that exist in the scikit-learn package with their optimized versions from the extension. +Once you install Intel*(R) Extension for Scikit-learn*, you replace algorithms that exist in the scikit-learn package with their optimized versions from the extension. This action is called ``patching``. This is not a permanent change so you can always undo the patching if necessary. -To patch Intel® Extension for Scikit-learn, use one of these methods: +To patch Intel® Extension for Scikit-learn, use one of these methods: -.. list-table:: +.. list-table:: :header-rows: 1 :align: left @@ -48,16 +46,16 @@ To patch Intel® Extension for Scikit-learn, use one of these methods: * - Use a flag in the command line - Run this command: - :: - + :: + python -m sklearnex my_application.py - * - Modify your script + * - Modify your script - Add the following lines: :: - + from sklearnex import patch_sklearn - patch_sklearn() + patch_sklearn() * - Import an estimator from the ``sklearnex`` module - Run this command: @@ -70,21 +68,21 @@ To patch Intel® Extension for Scikit-learn, use one of these methods: These patching methods are interchangeable. They support different enabling scenarios while producing the same result. - + **Example** This example shows how to patch Intel(R) extension for Scikit-Learn by modifing your script. To make sure that patching is registered by the scikit-learn estimators, always import scikit-learn after these lines. - + .. code-block:: python :caption: Example: Drop-In Patching - + import numpy as np from sklearnex import patch_sklearn patch_sklearn() # You need to re-import scikit-learn algorithms after the patch from sklearn.cluster import KMeans - + # The use of the original Scikit-learn is not changed X = np.array([[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]]) @@ -97,11 +95,11 @@ Global Patching You can also use global patching to patch all your scikit-learn applications without any additional actions. -Before you begin, make sure that you have read and write permissions for Scikit-learn files. +Before you begin, make sure that you have read and write permissions for Scikit-learn files. With global patching, you can: -.. list-table:: +.. list-table:: :header-rows: 1 :align: left @@ -111,19 +109,19 @@ With global patching, you can: * - Patch all supported algorithms - Run this command: - :: - + :: + python -m sklearnex.glob patch_sklearn - + - If you run the global patching command several times with different parameters, then only the last configuration is applied. * - Patch selected algorithms - Use ``--algorithm`` or ``-a`` keys with a list of algorithms to patch. For example, to patch only ``SVC`` and ``RandomForestClassifier`` estimators, run :: - + python -m sklearnex.glob patch_sklearn -a svc random_forest_classifier - - - + + - * - Enable global patching via code - Use the ``patch_sklearn`` function with the ``global_patch`` argument: @@ -132,7 +130,7 @@ With global patching, you can: from sklearnex import patch_sklearn patch_sklearn(global_patch=True) import sklearn - + - After that, Scikit-learn patches is enabled in the current application and in all others that use the same environment. * - Disable patching notifications - Use ``--no-verbose`` or ``-nv`` keys: @@ -140,7 +138,7 @@ With global patching, you can: :: python -m sklearnex.glob patch_sklearn -a svc random_forest_classifier -nv - - + - * - Disable global patching - Run this command: @@ -156,7 +154,7 @@ With global patching, you can: from sklearnex import unpatch_sklearn unpatch_sklearn(global_patch=True) - - + .. tip:: If you clone an environment with enabled global patching, it will already be applied in the new environment. Unpatching @@ -169,20 +167,20 @@ To unpatch successfully, you must reimport the scikit-learn package:: sklearnex.unpatch_sklearn() # Re-import scikit-learn algorithms after the unpatch - from sklearn.cluster import KMeans + from sklearn.cluster import KMeans -Installation +Installation -------------------- .. contents:: :local: -.. tip:: To prevent version conflicts, we recommend creating and activating a new environment for |intelex|. +.. tip:: To prevent version conflicts, we recommend creating and activating a new environment for |intelex|. -Install from PyPI +Install from PyPI ********************** -Recommended by default. +Recommended by default. To install |intelex|, run: @@ -223,12 +221,12 @@ To prevent version conflicts, we recommend installing `scikit-learn-intelex` int .. tab:: Conda-Forge channel - Recommended by default. - + Recommended by default. + To install, run:: conda install scikit-learn-intelex -c conda-forge - + .. list-table:: **Supported Configurations** :header-rows: 1 :align: left @@ -252,12 +250,12 @@ To prevent version conflicts, we recommend installing `scikit-learn-intelex` int .. tab:: Intel channel - Recommended for the Intel® Distribution for Python users. + Recommended for the Intel® Distribution for Python users. To install, run:: conda install scikit-learn-intelex -c https://software.repos.intel.com/python/conda/ - + .. list-table:: **Supported Configurations** :header-rows: 1 :align: left @@ -277,7 +275,7 @@ To prevent version conflicts, we recommend installing `scikit-learn-intelex` int - [CPU, GPU] - [CPU, GPU] - [CPU, GPU] - + .. tab:: Main channel @@ -285,7 +283,7 @@ To prevent version conflicts, we recommend installing `scikit-learn-intelex` int To install, run:: conda install scikit-learn-intelex - + .. list-table:: **Supported Configurations** :header-rows: 1 :align: left @@ -321,9 +319,9 @@ Download the Intel AI Tools `here `_ for each version of Intel® Extension for Scikit-learn*. +See the `Release Notes `_ for each version of Intel® Extension for Scikit-learn*. -System Requirements +System Requirements -------------------- Hardware Requirements @@ -339,7 +337,7 @@ Hardware Requirements - SSE4.2 - AVX2 - AVX512 - + .. note:: ARM* architecture is not supported. .. tab:: GPU @@ -367,21 +365,21 @@ Software Requirements - Linux* OS: Ubuntu* 18.04 or newer - Windows* OS 10 or newer - Windows* Server 2019 or newer - + .. important:: - + If you use accelerators, refer to `oneAPI DPC++/C++ Compiler System Requirements `_. Intel(R) Extension for Scikit-learn is compatible with the last four versions of scikit-learn: * 1.0.X * 1.1.X -* 1.2.X +* 1.2.X * 1.3.X Memory Requirements ********************** -By default, algorithms in |intelex| run in the multi-thread mode. This mode uses all available threads. +By default, algorithms in |intelex| run in the multi-thread mode. This mode uses all available threads. Optimized scikit-learn algorithms can consume more RAM than their corresponding unoptimized versions. .. list-table:: @@ -395,7 +393,7 @@ Optimized scikit-learn algorithms can consume more RAM than their corresponding - Both Scikit-learn and |intelex| consume approximately the same amount of RAM. - In |intelex|, an algorithm with ``N`` threads consumes ``N`` times more RAM. -In all |intelex| algorithms with GPU support, computations run on device memory. +In all |intelex| algorithms with GPU support, computations run on device memory. The device memory must be large enough to store a copy of the entire dataset. You may also require additional device memory for internal arrays that are used in computation. diff --git a/doc/sources/samples.rst b/doc/sources/samples.rst index 4ca25f6d92..6fbc516124 100644 --- a/doc/sources/samples.rst +++ b/doc/sources/samples.rst @@ -1,23 +1,21 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _samples: ####### -Samples +Samples ####### The following samples are also provided as Jupyter notebooks in |intelex| repository. diff --git a/doc/sources/support.rst b/doc/sources/support.rst index 03a2dddadb..0b7aaa43a9 100644 --- a/doc/sources/support.rst +++ b/doc/sources/support.rst @@ -1,33 +1,31 @@ -.. ****************************************************************************** -.. * Copyright 2021 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2021 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ###################################################### Intel(R) Extension for Scikit-learn Support ###################################################### -We are committed to providing support and assistance to help you make the most out of Intel(R) Extension for Scikit-learn. +We are committed to providing support and assistance to help you make the most out of Intel(R) Extension for Scikit-learn. -Use the following methods if you face any challenges. +Use the following methods if you face any challenges. Issues ---------------------------------- -If you have a problem, check out the `GitHub Issues `_ to see if the issue you want to address is already reported. +If you have a problem, check out the `GitHub Issues `_ to see if the issue you want to address is already reported. You may find users that have encountered the same bug or have similar ideas for changes or updates. diff --git a/doc/sources/tutorials.rst b/doc/sources/tutorials.rst index ce778bb5ab..6a43eaf4bf 100644 --- a/doc/sources/tutorials.rst +++ b/doc/sources/tutorials.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2024 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2024 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. ################################################ @@ -35,20 +33,20 @@ Tutorials .. grid-item-card:: Advanced scikit-learn* Essentials for Machine Learning :link: https://www.intel.com/content/www/us/en/developer/videos/advanced-scikit-learn-essentials-for-ml.html :padding: 1 - - Special technique to perform scikit-learn computation on Intel GPUs. - + + Special technique to perform scikit-learn computation on Intel GPUs. + .. grid-item-card:: Develop Efficient AI Solutions with Accelerated Machine Learning :link: https://www.intel.com/content/www/us/en/developer/videos/accelerated-machine-learning-for-ai-solutions.html :padding: 1 - Techniques for maximizing Intel® Extension for Scikit-learn*. + Techniques for maximizing Intel® Extension for Scikit-learn*. .. grid-item-card:: Getting started with classical Machine Learning Frameworks using Google Colaboratory :link: https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Getting-started-with-classical-Machine-Learning-Frameworks-using/post/1450139 :padding: 1 - Simple Installation of Intel® Extension for Scikit-learn* on Google Colaboratory. + Simple Installation of Intel® Extension for Scikit-learn* on Google Colaboratory. .. grid-item-card:: Accelerate Machine Learning Workloads: K-means and GPairs Algorithms :link: https://www.intel.com/content/www/us/en/developer/videos/accelerate-ml-workloads-k-means-gpairs-algorithms.html @@ -68,7 +66,7 @@ Tutorials An overview of scikit-learn essentials. -Case Studies +Case Studies ---------------------------------- .. grid:: 3 diff --git a/doc/sources/verbose.rst b/doc/sources/verbose.rst index cf77cc0669..acbfcd35c3 100755 --- a/doc/sources/verbose.rst +++ b/doc/sources/verbose.rst @@ -1,18 +1,16 @@ -.. ****************************************************************************** -.. * Copyright 2020 Intel Corporation -.. * -.. * Licensed under the Apache License, Version 2.0 (the "License"); -.. * you may not use this file except in compliance with the License. -.. * You may obtain a copy of the License at -.. * -.. * http://www.apache.org/licenses/LICENSE-2.0 -.. * -.. * Unless required by applicable law or agreed to in writing, software -.. * distributed under the License is distributed on an "AS IS" BASIS, -.. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -.. * See the License for the specific language governing permissions and -.. * limitations under the License. -.. *******************************************************************************/ +.. Copyright 2020 Intel Corporation +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. .. _verbose: diff --git a/examples/notebooks/README.md b/examples/notebooks/README.md index 26320057e8..f1041993d3 100644 --- a/examples/notebooks/README.md +++ b/examples/notebooks/README.md @@ -1,21 +1,37 @@ + + # :snake: Intel(R) Extension for Scikit-learn* notebooks -This folder contains examples of python notebooks that use Intel(R) extension for Scikit-learn for popular datasets. +This folder contains examples of python notebooks that use Intel(R) extension for Scikit-learn for popular datasets. #### :rocket: Jupyter startup guide You can use python notebooks with the help of Jupyter* notebook to run the following files: ```bash conda install -c conda-forge notebook scikit-learn-intelex -``` -or +``` +or ```bash pip install notebook scikit-learn-intelex -``` +``` Run Jupyter after installation: ```bash jupyter notebook --notebook-dir=./ --ip=* --no-browser -``` +``` #### :pencil: Table of contents