public bool IsDominatedBy(ParetoFrontPoint other) { return(other.Fitness >= Fitness && other.Simplicity > Simplicity || other.Fitness > Fitness && other.Simplicity >= Simplicity); }
public WinnerViewModel(ParetoFrontPoint paretoFrontPoint, IReadOnlyList <float> evaluationResult, int run, int generation) { ParetoFrontPoint = paretoFrontPoint; EvaluationResult = evaluationResult; Run = run; Generation = generation; }
private static void SetParetoRank(ParetoFrontPoint point, ICollection <ParetoFrontPoint> ranks) { var maxNonDominantFrontNumber = 0; foreach (var r in ranks) { if (point.IsDominatedBy(r) && maxNonDominantFrontNumber < r.Rank) { maxNonDominantFrontNumber = r.Rank; } } point.Rank = maxNonDominantFrontNumber + 1; ranks.Add(point); }
public bool IsBetterThan(ParetoFrontPoint other) { if (this == other) { return(false); } if (Rank < other.Rank) { return(true); } if (Rank > other.Rank) { return(false); } if (Sparsity < other.Sparsity) { return(false); } if (Sparsity > other.Sparsity) { return(true); } if (Fitness > other.Fitness) { return(true); } if (Fitness < other.Fitness) { return(false); } if (Simplicity > other.Simplicity) { return(true); } if (Simplicity < other.Simplicity) { return(false); } return(false); }
private static bool IsBetterFitness(ParetoFrontPoint curr, ParetoFrontPoint candidate) { return(curr.Fitness < candidate.Fitness || Math.Abs(curr.Fitness - candidate.Fitness) <= float.Epsilon && curr.Complexity > candidate.Complexity); }
private static bool IsBetterComplexity(ParetoFrontPoint curr, ParetoFrontPoint candidate) { return(curr.Complexity > candidate.Complexity || curr.Complexity == candidate.Complexity && curr.Fitness < candidate.Fitness); }