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.BatchTerm to 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 invert is 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

Parameters:
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:

Tuple[BatchTerm, ndarray]