pysdic.build_transformation_term#
- build_transformation_term(transformation, input_points, output_points, parameters=None, *, kwargs=None, mode='rJ', weight=1.0, loss=None, loss_scale=1.0, filter_nans=False, sparse=False, use_cache=False)[source]#
Build a
pysolvegn.Termto optimize the parameters \(\vec{p}\) of a single transformation \(T\) such that \(T(X; \vec{p}) \approx Y\):\[\min_{\vec{p}} \frac{1}{2} \sum_j \rho\left( \| T(X_j; \vec{p}) - Y_j \|^2 \right)\]See also
Function
pysdic.build_chains_transformation_term()for the description of the modes and arguments.
- Parameters:
transformation (Transformation) – The transformation to optimize. It must not be locked.
input_points (ArrayLike) – The input points \(X\) with shape \((\dots, n_i)\).
output_points (ArrayLike) – The output points \(Y\) with shape \((\dots, n_o)\).
parameters (Optional[ArrayLike], optional (default:
None)) – The initial parameters.Nonemeans the current parameters of the transformation.kwargs (Optional[Dict[str, Any]], optional (default:
None)) – Additional keyword arguments passed to theapplymethod of the transformation.mode (str) – See
pysdic.build_chains_transformation_term().weight (Real) – See
pysdic.build_chains_transformation_term().loss (str | Callable | None) – See
pysdic.build_chains_transformation_term().loss_scale (Real) – See
pysdic.build_chains_transformation_term().filter_nans (bool) – See
pysdic.build_chains_transformation_term().sparse (bool) – See
pysdic.build_chains_transformation_term().use_cache (bool) – See
pysdic.build_chains_transformation_term().
- Returns:
pysolvegn.Term – The term to give to
pysolvegn.solve.numpy.ndarray – The initial parameters with shape \((n_p,)\), to use as
p0.
- Return type: