.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 .. _op_supported: ==================== Supported operations ==================== This section describes all operations supported by oneDAL. For more information about general operation definition, refer to :txtref:`Operations ` section. The table bellow specifies whether an algorithm's descriptor can be used together with each operation. .. |train| replace:: :txtref:`Train ` .. |infer| replace:: :txtref:`Infer ` .. |compute| replace:: :txtref:`Compute ` .. |kmeans| replace:: :txtref:`K-Means ` .. |kmeans_init| replace:: :txtref:`K-Means Initialization ` .. |knn| replace:: :txtref:`k-NN ` .. |pca| replace:: :txtref:`PCA ` +------------------+------------------------------------+ | | Operations | | Algorithm +-----------+----------+-------------+ | | |train| | |infer| | |compute| | +==================+===========+==========+=============+ | |kmeans| | Yes | Yes | No | +------------------+-----------+----------+-------------+ | |kmeans_init| | No | No | Yes | +------------------+-----------+----------+-------------+ | |knn| | Yes | Yes | No | +------------------+-----------+----------+-------------+ | |pca| | Yes | Yes | No | +------------------+-----------+----------+-------------+ .. _op_train: Train ----- The ``train`` operation performs :capterm:`training` procedure of a machine learning algorithm. The result obtained after the training contains a :capterm:`model` that can be passed to the ``infer`` operation. .. code-block:: cpp namespace oneapi::dal { template using train_input_t = /* implementation defined */; template using train_result_t = /* implementation defined */; template train_result_t train( sycl::queue& queue, const Descriptor& desc, const train_input_t& input); } // namespace oneapi::dal .. _op_infer: Infer ----- The ``infer`` operation performs :capterm:`inference` procedure of a machine learning algorithm based on the model obtained as a result of training. .. code-block:: cpp namespace oneapi::dal { template using infer_input_t = /* implementation defined */; template using infer_result_t = /* implementation defined */; template infer_result_t infer( sycl::queue& queue, const Descriptor& desc, const infer_input_t& input); } // namespace oneapi::dal .. _op_compute: Compute ------- The ``compute`` operation is used if an algorithm does not have the well-defined training and inference stages. .. code-block:: cpp namespace oneapi::dal { template using compute_input_t = /* implementation defined */; template using compute_result_t = /* implementation defined */; template compute_result_t compute( sycl::queue& queue, const Descriptor& desc, const compute_input_t& input); } // namespace oneapi::dal