Skip to content

Commit

Permalink
clean up malformatted doc elements
Browse files Browse the repository at this point in the history
  • Loading branch information
agoscinski committed Jul 27, 2023
1 parent 23f4c1b commit 12ffc9c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
25 changes: 23 additions & 2 deletions docs/src/preprocessing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
Preprocessing
=============

.. automodule:: skmatter.preprocessing

KernelNormalizer
----------------

.. autoclass:: skmatter.preprocessing.KernelNormalizer
:members:
:undoc-members:
:inherited-members:


SparseKernelCenterer
--------------------

.. autoclass:: skmatter.preprocessing.SparseKernelCenterer
:members:
:undoc-members:
:inherited-members:

StandardFlexibleScaler
----------------------

.. autoclass:: skmatter.preprocessing.StandardFlexibleScaler
:members:
:undoc-members:
:show-inheritance:
:inherited-members:
2 changes: 1 addition & 1 deletion docs/src/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ for feature and sample selection.
Random Partitioning with Overlaps
#################################

.. automodule:: skmatter.model_selection._split
.. autofunction:: skmatter.model_selection.train_test_split
9 changes: 5 additions & 4 deletions src/skmatter/preprocessing/_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,11 @@ class KernelNormalizer(KernelCenterer):
"""Kernel centering method, similar to KernelCenterer,
but with additional scaling and ability to pass a set of sample weights.
Let K(x, z) be a kernel defined by phi(x)^T phi(z), where phi is a
function mapping x to a Hilbert space. KernelNormalizer centers (i.e.,
normalize to have zero mean) the data without explicitly computing phi(x).
It is equivalent to centering and scaling phi(x) with
Let :math:`K(x, z)` be a kernel defined by :math:`\\phi(x)^T \\phi(z)`,
where :math:`\\phi` is a function mapping x to a Hilbert space.
KernelNormalizer centers (i.e., normalize to have zero mean) the data without
explicitly computing :math:`\\phi(x)`.
It is equivalent to centering and scaling :math:`\\phi(x)` with
sklearn.preprocessing.StandardScaler(with_std=False).
Parameters
Expand Down
2 changes: 1 addition & 1 deletion src/skmatter/utils/_orthogonalizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def Y_feature_orthogonalizer(y, X, tol=1e-12, copy=True):

def Y_sample_orthogonalizer(y, X, y_ref, X_ref, tol=1e-12, copy=True):
"""
Orthogonalizes a matrix of targets :math:`{\\mathbf{Y}}`given a reference feature
Orthogonalizes a matrix of targets :math:`{\\mathbf{Y}}` given a reference feature
matrix :math:`{\\mathbf{X}_r}` and reference target matrix :math:`{\\mathbf{Y}_r}`:
.. math::
Expand Down

0 comments on commit 12ffc9c

Please sign in to comment.