@@ -20,11 +20,13 @@ def pointwise_global_reconstruction_error(
2020 scaler = None ,
2121 estimator = None ,
2222):
23- """Computes the pointwise global reconstruction error using the source X
23+ r """Computes the pointwise global reconstruction error using the source X
2424 to reconstruct the features or samples of target Y based on a minimization
2525 by linear regression:
2626
27- :math:`GRE^{(i)}(X,Y) = \min_W ||y_i - x_iW||` % # noqa: W605
27+ .. math::
28+
29+ GRE^{(i)}(X,Y) = \min_W ||y_i - x_iW||
2830
2931 If used with X and Y of shape (n_samples, n_features) it computes the pointwise
3032 global reconstruction error of the features as defined in Ref. [Goscinski2021]_.
@@ -109,11 +111,13 @@ def global_reconstruction_error(
109111 scaler = None ,
110112 estimator = None ,
111113):
112- """Computes the global reconstruction error using the source X
114+ r """Computes the global reconstruction error using the source X
113115 to reconstruct the features or samples of target Y based on a minimization
114116 by linear regression:
115117
116- :math:`GRE(X,Y) = \min_W ||Y - XW||`` % # noqa: W605
118+ .. math::
119+
120+ GRE(X,Y) = \min_W ||Y - XW||
117121
118122 If used with X and Y of shape (n_samples, n_features) it computes the
119123 global reconstruction error of the features as defined in Ref. [Goscinski2021]_.
@@ -186,11 +190,13 @@ def pointwise_global_reconstruction_distortion(
186190 scaler = None ,
187191 estimator = None ,
188192):
189- """Computes the pointwise global reconstruction distortion using the source X
193+ r """Computes the pointwise global reconstruction distortion using the source X
190194 to reconstruct the features or samples of target Y based on a minimization
191195 by orthogonal regression:
192196
193- :math:`GRD^{(i)}(X,Y) = \min_Q ||y_i - x_iQ\|| \quad\mathrm{subject\ to}\quad Q^TQ=I` % # noqa: W605
197+ .. math::
198+
199+ GRD^{(i)}(X,Y) = \min_Q ||y_i - x_iQ\|| \quad\mathrm{subject\ to}\quad Q^TQ=I
194200
195201 If used with X and Y of shape (n_samples, n_features) it computes the pointwise
196202 global reconstruction distortion of the features as defined in Ref. [Goscinski2021]_.
@@ -280,11 +286,13 @@ def global_reconstruction_distortion(
280286 scaler = None ,
281287 estimator = None ,
282288):
283- """Computes the global reconstruction distortion using the source X
289+ r """Computes the global reconstruction distortion using the source X
284290 to reconstruct the features or samples of target Y based on a minimization
285291 by orthogonal regression:
286292
287- :math:`GRD(X,Y) = \min_Q ||y - XQ\|| \quad\mathrm{subject\ to}\quad Q^TQ=I` % # noqa: W605
293+ .. math::
294+
295+ GRD(X,Y) = \min_Q ||y - XQ\|| \quad\mathrm{subject\ to}\quad Q^TQ=I
288296
289297 If used with X and Y of shape (n_samples, n_features) it computes the
290298 global reconstruction distortion of the features as defined in Ref. [Goscinski2021]_.
@@ -363,8 +371,14 @@ def pointwise_local_reconstruction_error(
363371 to reconstruct the features or samples of target Y based on a minimization
364372 by linear regression:
365373
366- :math:`\tilde{\mathbf{x}}'_i = \bar{\mathbf{x}} + (\mathbf{x}_i - \bar{\mathbf{x}})\mathbf{P}^{(i)}` % # noqa: W605
367- :math:`LRE^{(i)}(X,Y) = \|\mathbf{x}'_i - \tilde{\mathbf{x}}'_i\|^2` % # noqa: W605
374+ .. math::
375+
376+ \tilde{\mathbf{x}}'_i = \bar{\mathbf{x}} + (\mathbf{x}_i
377+ - \bar{\mathbf{x}})\mathbf{P}^{(i)}
378+
379+ .. math::
380+
381+ LRE^{(i)}(X,Y) = \|\mathbf{x}'_i - \tilde{\mathbf{x}}'_i\|^2
368382
369383 If used with X and Y of shape (n_samples, n_features) it computes the pointwise
370384 local reconstruction error of the features as defined in Ref. [Goscinski2021]_.
@@ -493,7 +507,9 @@ def local_reconstruction_error(
493507 to reconstruct the features or samples of target Y based on a minimization
494508 by linear regression:
495509
496- :math:`LRE(X,Y) = \sqrt{\sum_i LRE^{(i)}(X,Y)}/\sqrt{n_\text{test}}` % # noqa: W605
510+ .. math::
511+
512+ LRE(X,Y) = \sqrt{\sum_i LRE^{(i)}(X,Y)}/\sqrt{n_\text{test}}
497513
498514 If used with X and Y of shape (n_samples, n_features) it computes the
499515 local reconstruction error of the features as defined in Ref. [Goscinski2021]_.
0 commit comments