pysdic.build_transformation_input_points_term#
- build_transformation_input_points_term(transformation, output_points, guess, *, kwargs=None, mode='rJ', weight=1.0, loss=None, loss_scale=1.0, use_cache=False)[source]#
Build a
pysolvegn.BatchTermto optimize the input points \(X\) of a transformation \(T\) such that \(T(X) \approx Y\). Each point \(k\) is an independent problem of the batch:\[\min_{\vec{X}_k} \frac{1}{2} \sum_j \rho\left( \left( T(\vec{X}_k) - \vec{Y}_k \right)_j^2 \right)\]It is a numerical inverse of the transformation, for example when
invertis not implemented or to refine its result.Warning
The input dimension \(n_i\) must be lower than or equal to the output dimension \(n_o\).
See also
Function
pysdic.build_chains_transformation_input_points_term()for the description of the modes and arguments.
- Parameters:
transformation (Transformation) – The transformation. Its parameters must be set.
output_points (ArrayLike) – The output points \(Y\) with shape \((\dots, n_o)\).
guess (ArrayLike) – The initial guess of the input points with shape \((\dots, n_i)\).
kwargs (Optional[Dict[str, Any]], optional (default:
None)) – Additional keyword arguments passed to theapplymethod of the transformation (they must not depend on the points).mode (str) – See
pysdic.build_chains_transformation_input_points_term().weight (Real | _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – See
pysdic.build_chains_transformation_input_points_term().loss (str | Callable | None) – See
pysdic.build_chains_transformation_input_points_term().loss_scale (Real) – See
pysdic.build_chains_transformation_input_points_term().use_cache (bool) – See
pysdic.build_chains_transformation_input_points_term().
- Returns:
pysolvegn.BatchTerm – The term to give to
pysolvegn.solve_batch.numpy.ndarray – The initial input points with shape \((k, n_i)\), to use as
p0.
- Return type: