class_docstr: Class for the visualization of Pareto models. Handles the intermediary steps
  between having the results and creating the plot.
  
  Parameters
  ----------
  results : dict[str, dict[str, Result]]
      A dictionary of results, obtained from
      aequitas.fairflow.utils.artifacts.read_results.
  dataset : str
      Name of the dataset to be used in the Pareto plot.
  method : str, optional
      Name of the method to plot. If none, all methods will be plotted.
  fairness_metric : {"Predictive Equality", "Equal Opportunity", "Demographic Parity"}
      The default fairness metric to use in the Pareto plot.
  performance_metric : {"TPR", "FPR", "FNR", "Accuracy", "Precision"}
      The default performance metric to use in the Pareto plot.
  alpha : float, optional
      The alpha value to use in the Pareto plot.
  direction : {"minimize", "maximize"}, optional
      The direction to use in the Pareto plot.
class_docstr_tok: ["Class","for","the","visualization","of","Pareto","models",".","Handles","the","intermediary","steps","between","having","the","results","and","creating","the","plot",".","Parameters","--","--","--","--","--","results",":","dict","[","str",",","dict","[","str",",","Result","]","]","A","dictionary","of","results",",","obtained","from","aequitas.fairflow.utils.artifacts.read_results",".","dataset",":","str","Name","of","the","dataset","to","be","used","in","the","Pareto","plot",".","method",":","str",",","optional","Name","of","the","method","to","plot",".","If","none",",","all","methods","will","be","plotted",".","fairness_metric",":","{","``","Predictive","Equality","''",",","``","Equal","Opportunity","''",",","``","Demographic","Parity","''","}","The","default","fairness","metric","to","use","in","the","Pareto","plot",".","performance_metric",":","{","``","TPR","''",",","``","FPR","''",",","``","FNR","''",",","``","Accuracy","''",",","``","Precision","''","}","The","default","performance","metric","to","use","in","the","Pareto","plot",".","alpha",":","float",",","optional","The","alpha","value","to","use","in","the","Pareto","plot",".","direction",":","{","``","minimize","''",",","``","maximize","''","}",",","optional","The","direction","to","use","in","the","Pareto","plot","."]
docstr: Finds the pareto-efficient points.
  
  Parameters
  ----------
  points : np.ndarray
      An (n_points, n_costs) array with the costs if direction=="minimize", or
      objectives to maximize if direction=="maximize".
  direction : "minimize" or "maximize", optional (default: "minimize")
      Whether to minimize or maximize the given points.
  
  Returns
  -------
  List[bool]
      A boolean np.ndarray with the same length as the input array, and whose
      value indicates if the model at a given index is Pareto efficient.
docstr_tok: ["Finds","the","pareto-efficient","points",".","Parameters","--","--","--","--","--","points",":","np.ndarray","An","(","n_points",",","n_costs",")","array","with","the","costs","if","direction==","''","minimize","''",",","or","objectives","to","maximize","if","direction==","''","maximize","''",".","direction",":","``","minimize","''","or","``","maximize","''",",","optional","(","default",":","``","minimize","''",")","Whether","to","minimize","or","maximize","the","given","points",".","Returns","--","--","--","-","List","[","bool","]","A","boolean","np.ndarray","with","the","same","length","as","the","input","array",",","and","whose","value","indicates","if","the","model","at","a","given","index","is","Pareto","efficient","."]
code: def _is_pareto_efficient(
      points: np.ndarray, direction: str = "minimize"
  ):
      """Finds the pareto-efficient points.
  
      Parameters
      ----------
      points : np.ndarray
          An (n_points, n_costs) array with the costs if direction=="minimize", or
          objectives to maximize if direction=="maximize".
      direction : "minimize" or "maximize", optional (default: "minimize")
          Whether to minimize or maximize the given points.
  
      Returns
      -------
      List[bool]
          A boolean np.ndarray with the same length as the input array, and whose
          value indicates if the model at a given index is Pareto efficient.
      """
      assert direction in {"minimize", "maximize"}
      if direction == "maximize":
          points = 1 - points
      is_efficient = np.ones(points.shape[0], dtype=bool)
      for i, c in enumerate(points):
          if is_efficient[i]:
              is_efficient[is_efficient] = np.any(
                  points[is_efficient] < c, axis=1
              )  # Keep any point with a lower cost
              is_efficient[i] = True  # And keep self
      return is_efficient
  
file_path: aequitas/src/aequitas/fairflow/plots/pareto/plot.py
imports: from typing import Any, Literal, Optional, Union
  from pathlib import Path
  import numpy
  import pandas
  from ...evaluation import Result
  from ....bias import Bias
  from ....group import Group
  from ....plot import summary
label_desc: Use image node_id 5 for calling the Plot obj's underlying member method code with example usage: obj._is_pareto_efficient(points, direction) and returns: is_efficient