Base class for creating a model that can produce a target menpo.shape.PointCloud and knows how to compute its own derivative with respect to its parametrisation.
model (class) – The trained model (e.g. menpo.model.PCAModel).
Returns a flattened representation of the object as a single vector.
vector ((N,) ndarray) – The core representation of the object, flattened into a single vector. Note that this is always a view back on to the original object, but is not writable.
Generate an efficient copy of this object.
Note that Numpy arrays and other Copyable objects on
selfwill be deeply copied. Dictionaries and sets will be shallow copied, and everything else will be assigned (no copy will be made).
Classes that store state other than numpy arrays and immutable types should overwrite this method to ensure all state is copied.
type(self)– A copy of this object
The derivative of this spatial object with respect to the parametrisation changes evaluated at points.
(n_points, n_dims)ndarray) – The spatial points at which the derivative should be evaluated.
(n_points, n_parameters, n_dims)ndarray) – The Jacobian with respect to the parametrisation.
d_dp[i, j, k]is the scalar differential change that the
k’th dimension of the
i’th point experiences due to a first order change in the
j’th scalar in the parametrisation vector.
Build a new instance of the object from it’s vectorized state.
selfis used to fill out the missing state required to rebuild a full object from it’s standardized flattened state. This is the default implementation, which is which is a
deepcopyof the object followed by a call to
from_vector_inplace(). This method can be overridden for a performance benefit if desired.
(n_parameters,)ndarray) – Flattened representation of the object.
type(self)) – An new instance of this class.
Deprecated. Use the non-mutating API, from_vector.
For internal usage in performance-sensitive spots, see _from_vector_inplace()
(n_parameters,)ndarray) – Flattened representation of this object
Tests if the vectorized form of the object contains
nanvalues or not. This is particularly useful for objects with unknown values that have been mapped to
has_nan_values (bool) – If the vectorized object contains
Update this object so that it attempts to recreate the
new_target (PointCloud) – The new target that this object should try and regenerate.
The length of the vector that this object produces.
The number of parameters in the linear model.
The current menpo.shape.PointCloud that this object produces.
The weights of the model.