Skip to content

Commit 7b540a0

Browse files
author
Christian Jorgensen
committed
Revert doctest changes
1 parent 9aad7a9 commit 7b540a0

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/skmatter/decomposition/_kernel_pcovc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ class KernelPCovC(LinearClassifierMixin, _BaseKPCov):
199199
>>> kpcovc.fit(X, Y)
200200
KernelPCovC(gamma=1, kernel='rbf', mixing=0.1, n_components=2)
201201
>>> kpcovc.transform(X)
202-
array([[-4.41692911e-01, 6.87831803e-06],
203-
[ 4.47719340e-01, 5.47456981e-01],
204-
[ 4.47850288e-01, -5.47360522e-01],
205-
[-4.41645711e-01, -7.05197801e-05]])
202+
array([[-4.45970689e-01, 8.95327566e-06],
203+
[ 4.52745933e-01, 5.54810948e-01],
204+
[ 4.52881359e-01, -5.54708315e-01],
205+
[-4.45921092e-01, -7.32157649e-05]])
206206
>>> kpcovc.predict(X)
207207
array([2, 0, 1, 2])
208208
>>> kpcovc.score(X, Y)

src/skmatter/decomposition/_pcovc.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ class PCovC(LinearClassifierMixin, _BasePCov):
195195
the projector, or weights, from the latent-space projection
196196
:math:`\mathbf{T}` to the class confidence scores :math:`\mathbf{Z}`
197197
198+
scale_z: bool
199+
Whether Z is being scaled prior to eigendecomposition
200+
198201
explained_variance_ : numpy.ndarray of shape (n_components,)
199202
The amount of variance explained by each of the selected components.
200203
Equal to n_components largest eigenvalues
@@ -215,10 +218,10 @@ class PCovC(LinearClassifierMixin, _BasePCov):
215218
>>> pcovc.fit(X, Y)
216219
PCovC(mixing=0.1, n_components=2)
217220
>>> pcovc.transform(X)
218-
array([[-0.38989065, -0.21368409],
219-
[ 1.55313271, 0.20273297],
220-
[-0.87105559, 0.68233882],
221-
[-0.29218647, -0.6713877 ]])
221+
array([[-0.4794854 , -0.46228114],
222+
[ 1.9416966 , 0.2532831 ],
223+
[-1.08744947, 0.89117784],
224+
[-0.37476173, -0.6821798 ]])
222225
>>> pcovc.predict(X)
223226
array([0, 1, 2, 0])
224227
""" # NoQa: E501

0 commit comments

Comments
 (0)