VInvertible¶
-
class
menpo.transform.base.invertible.
VInvertible
[source]¶ Bases:
Invertible
Mix-in for
Vectorizable
Invertible
Transform
s.Prefer this mix-in over
Invertible
if theTransform
in question isVectorizable
as this addsfrom_vector()
variants to theInvertible
interface. These can be tuned for performance, and are, for instance, needed by some of the machinery of fit.-
pseudoinverse
()¶ The pseudoinverse of the transform - that is, the transform that results from swapping source and target, or more formally, negating the transforms parameters. If the transform has a true inverse this is returned instead.
Type: type(self)
-
pseudoinverse_vector
(vector)[source]¶ The vectorized pseudoinverse of a provided vector instance. Syntactic sugar for:
self.from_vector(vector).pseudoinverse().as_vector()
Can be much faster than the explict call as object creation can be entirely avoided in some cases.
Parameters: vector ( (n_parameters,)
ndarray) – A vectorized version ofself
Returns: pseudoinverse_vector ( (n_parameters,)
ndarray) – The pseudoinverse of the vector provided
-
has_true_inverse
¶ True
if the pseudoinverse is an exact inverse.Type: bool
-