|
11 | 11 | .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | .. See the License for the specific language governing permissions and |
13 | 13 | .. limitations under the License. |
14 | | -
|
| 14 | +.. include:: substitutions.rst |
15 | 15 | .. _input_types: |
16 | 16 |
|
17 | 17 | ===================== |
18 | 18 | Supported input types |
19 | 19 | ===================== |
20 | 20 |
|
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 |
22 | 22 | and work with different classes of input data, including: |
23 | 23 |
|
24 | 24 | - `Numpy <https://numpy.org/>`__ arrays. |
25 | 25 | - Other array classes implementing the `Array API <https://data-apis.org/array-api/latest/>`__ protocol |
26 | 26 | (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. |
29 | 29 |
|
30 | | -In addition, Extension also supports: |
| 30 | +In addition, |sklearnex| also supports: |
31 | 31 |
|
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>`. |
34 | 34 |
|
35 | 35 | Stock Scikit-Learn estimators, depending on the version, might offer support for additional |
36 | 36 | input types beyond this list, such as ``DataFrame`` and ``Series`` classes from other libraries |
37 | 37 | like `Polars <https://pola.rs>`__. |
38 | 38 |
|
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). |
42 | 45 |
|
43 | 46 | .. warning:: |
44 | 47 | In some cases data passed to estimators might be copied/duplicated during calls to methods such as fit/predict. |
45 | 48 | The affected cases are listed below. |
46 | 49 |
|
47 | 50 | - 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. |
49 | 52 | - 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. |
51 | 54 | - 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 |
52 | 55 | (for applicable methods) is copied to the source device. |
0 commit comments