Skip to content

Commit 65cd170

Browse files
add clickable links in supported input docs (#2711)
1 parent 2ad6ef7 commit 65cd170

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

doc/sources/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
intersphinx_mapping = {
7676
"sklearn": ("https://scikit-learn.org/stable/", None),
7777
"dpctl": ("https://intelpython.github.io/dpctl/latest", None),
78+
"dpnp": ("https://intelpython.github.io/dpnp", None),
7879
"mpi4py": ("https://mpi4py.readthedocs.io/en/stable/", None),
7980
"xgboost": ("https://xgboost.readthedocs.io/en/stable/", None),
8081
# from scikit-learn, in case some object in sklearnex points to them:

doc/sources/input-types.rst

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,45 @@
1111
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
.. See the License for the specific language governing permissions and
1313
.. limitations under the License.
14-
14+
.. include:: substitutions.rst
1515
.. _input_types:
1616

1717
=====================
1818
Supported input types
1919
=====================
2020

21-
Just like Scikit-Learn estimators, estimators from Extension are able to accept
21+
Just like |sklearn| estimators, estimators from the |sklearnex| are able to accept
2222
and work with different classes of input data, including:
2323

2424
- `Numpy <https://numpy.org/>`__ arrays.
2525
- Other array classes implementing the `Array API <https://data-apis.org/array-api/latest/>`__ protocol
2626
(see :ref:`array_api` for details).
27-
- `SciPy sparse arrays and sparse matrices <https://docs.scipy.org/doc/scipy/tutorial/sparse.html>`__ (depending on the estimator).
28-
- `Pandas <https://pandas.pydata.org>`__ ``DataFrame`` and ``Series`` classes.
27+
- SciPy :external+scipy:doc:`sparse arrays and sparse matrices <tutorial/sparse>` (depending on the estimator).
28+
- Pandas :external+pandas:doc:`DataFrame and Series <user_guide/dsintro>` classes.
2929

30-
In addition, Extension also supports:
30+
In addition, |sklearnex| also supports:
3131

32-
- `dpnp <https://github.com/IntelPython/dpnp>`__ arrays.
33-
- `dpctl <https://intelpython.github.io/dpctl/latest/index.html>`__ arrays.
32+
- :external+dpnp:doc:`dpnp.ndarray <reference/ndarray>`.
33+
- :external+dpctl:doc:`dpctl.tensor <api_reference/dpctl/tensor>`.
3434

3535
Stock Scikit-Learn estimators, depending on the version, might offer support for additional
3636
input types beyond this list, such as ``DataFrame`` and ``Series`` classes from other libraries
3737
like `Polars <https://pola.rs>`__.
3838

39-
Extension currently does not offer accelerated routines for input types not listed
40-
here - when receiving an unsupported class, estimators will fall back to stock Scikit-Learn to
41-
handle it, so make sure to convert them to a supported type when using Extension.
39+
|sklearnex| currently does not offer accelerated routines for input types not listed here - when
40+
receiving an unsupported class, estimators will either convert to a supported class under some
41+
circumstances (e.g. PyArrow tables might get converted to NumPy arrays when passed to data
42+
validators from stock |sklearn|), throw an error (e.g. when passing some data format not that's
43+
not recognized by |sklearn|), or fall back to stock |sklearn| to handle it (when array API is
44+
enabled the input is unsupported).
4245

4346
.. warning::
4447
In some cases data passed to estimators might be copied/duplicated during calls to methods such as fit/predict.
4548
The affected cases are listed below.
4649

4750
- Non-contiguous NumPy array - i.e. where strides are wider than one element across both rows and columns
48-
- For SciPy CSR matrix / CSR array index array is always copied.
51+
- For SciPy CSR matrix / array, index arrays are always copied.
4952
- Heterogeneous NumPy array
50-
- If SYCL queue is provided for device without `float64` support but data are `float64`, data are copied with reduced precision.
53+
- If SYCL queue is provided for device without ``float64`` support but data are ``float64``, data are copied with reduced precision.
5154
- If :ref:`Array API <array_api>` is not enabled then data from GPU devices are always copied to the host device and then result table
5255
(for applicable methods) is copied to the source device.

0 commit comments

Comments
 (0)