Skip to content

Commit

Permalink
Merge pull request #7 from HiDiHlabs/sklearn_compat
Browse files Browse the repository at this point in the history
Sklearn compatibility
  • Loading branch information
niklasmueboe authored Jun 19, 2024
2 parents 19e2e1b + 354bd98 commit 5ae27f5
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 168 deletions.
10 changes: 5 additions & 5 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ API
===


The API for :py:class:`multispaeti.MultispatiPCA` tries to follow the design in
`scikit-learn <https://scikit-learn.org/>`_. The plan is to make it fully compatible in
the future by inheriting from :py:class:`sklearn.base.BaseEstimator` and
:py:class:`sklearn.base.TransformerMixin`.

The API for :py:class:`multispaeti.MultispatiPCA` follows the design in
`scikit-learn <https://scikit-learn.org/>`_. It inherits from
:py:class:`sklearn.base.BaseEstimator`, :py:class:`sklearn.base.TransformerMixin`, and
:py:class:`sklearn.base.ClassNamePrefixFeaturesOutMixin` making it fully compatible
with `scikit-learn` pipelines.


.. currentmodule:: multispaeti
Expand Down
3 changes: 2 additions & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ As for e.g. :py:class:`sklearn.decomposition.PCA` we first need to
msPCA.fit(X)
X_transformed = msPCA.transform(X)
Alternatively, this can be achieved in one step by
:py:meth:`multispaeti.MultispatiPCA.fit_transform`
:py:meth:`multispaeti.MultispatiPCA.fit_transform` which avoids redundant computation.

.. code-block:: python
Expand Down
Loading

0 comments on commit 5ae27f5

Please sign in to comment.