trans_ndpt_to_vec_dist#

pybrops.breed.prot.sel.transfn.trans_ndpt_to_vec_dist(mat, objfn_wt, wt, **kwargs)[source]#

Transform a set of non-dominated points by calculating their distances to a vector.

Parameters:
  • mat (numpy.ndarray) – A point coordinate array of shape (npt, nobj) where ‘npt’ is the number of points and ‘nobj’ is the number of objectives (dimensions). This array contains input points for calculating the distance between a point to the vector ‘wt’.

  • objfn_wt (numpy.ndarray) – An objective function weight array of shape (nobj,) where ‘nobj’ is the number of objectives (dimensions). This array is used to weight the objectives as increasing (1.0) or decreasing (-1.0). Objective function weights outside these values have undefined behavior.

  • wt (numpy.ndarray) – A vector array of shape (nobj,) where ‘nobj’ is the number of objectives (dimensions). This array is used as the vector to calculate the distance between each point in ‘mat’

  • kwargs (dict) – Additional keyword arguments. Not used by this function.

Returns:

out – An array of shape (npt,) containing the distance between each point to the vector.

Return type:

numpy.ndarray

Notes

How the transformation is done:

  1. Apply weights to each objective.

  2. Scale points for each objective to the range [0,1]

  3. For each scaled point, calculate a plane that is both perpendicular to the input vector and contains the point. Determine the point on the plane where the vector intersects the plane.

  4. Calculate the distance (norm) between the two points.