VInvertible¶

class menpo.transform.base.invertible.VInvertible[source]

Bases: Invertible

Prefer this mix-in over Invertible if the Transform in question is Vectorizable as this adds from_vector() variants to the Invertible 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 of self

Returns

pseudoinverse_vector ((n_parameters,) ndarray) – The pseudoinverse of the vector provided

property has_true_inverse

True if the pseudoinverse is an exact inverse.

Type

bool