.. _chapter_oemath_sexamples:

********************************************************************************
OEMath Examples
********************************************************************************

The following table lists the currently available **OEMath** examples:

.. oe:language:: c++

   .. list-table::
      :widths: 100 100
      :header-rows: 1

      * - Program
        - Description

      * - :ref:`docking<section_examples_kpls>`
        - Fitting model with kernel PLS

.. oe:language:: python

   .. list-table::
      :widths: 100 100
      :header-rows: 1

      * - Program
        - Description

      * - :ref:`docking<section_examples_kpls>`
        - Fitting model with kernel PLS

.. _section_examples_kpls:

Fitting model with kernel PLS
--------------------------------------------------------------------------------

The following code example shows how to fit a kernel PLS model.
The input descriptors matrix must be symmetric for fitting
with kernel PLS.

.. seealso::

   * :ref:`OEKernelPLS <OEMath_OEKernelPLS>` class

.. oe:source:: kpls.cpp
   :language: c++
   :caption:  Fitting model with kernel PLS
   :refnum:   1

.. oe:language:: c++

   .. only:: oehtml

      .. admonition:: Download code

         :download:`kpls.cpp <../../../../sublibs/tklibs/oechem/examples/kpls.cpp>`

.. oe:source:: kpls.py
   :language: python
   :caption:  Fitting model with kernel PLS
   :refnum:   1

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`kpls.py <../../../../wrappers/python/examples/oechem/kpls.py>`

