evomo.operators#
Submodules#
Functions#
|
Compute the crowding distance for a set of solutions in multi-objective optimization. |
|
Compute the non-domination rank for a set of solutions in multi-objective optimization. |
Package Contents#
- evomo.operators.crowding_distance(costs: torch.Tensor, mask: torch.Tensor)#
Compute the crowding distance for a set of solutions in multi-objective optimization.
The crowding distance is a measure of the diversity of solutions within a Pareto front.
- Parameters:
costs – A 2D tensor where each row represents a solution, and each column represents an objective.
mask – A 1D boolean tensor indicating which solutions should be considered.
- Returns:
A 1D tensor containing the crowding distance for each solution.
- evomo.operators.non_dominate_rank(x: torch.Tensor, cv: torch.Tensor = None) torch.Tensor#
Compute the non-domination rank for a set of solutions in multi-objective optimization.
The non-domination rank is a measure of the Pareto optimality of each solution.
- Parameters:
x – A 2D tensor where each row represents a solution, and each column represents an objective.
cv – An optional tensor containing the constraint violations of the solutions.
- Returns:
A 1D tensor containing the zero-based non-domination rank for each solution. Solutions in the first Pareto front have rank 0.