Skip to main content

Find Best Actions

def find_best_actions(
targets: dict[str, float],
actionable: list[str],
fixed: dict[str, list[float]] = \{\},
constraints: dict[str, tuple] = \{\},
data: pd.DataFrame = None,
target_importance: dict[str, float] = \{\}) -> pd.DataFrame

Get the optimal actions for a given set of target outcomes.

Arguments:

  • targets dict[str, float] - A dictionary representing the target outcomes.
  • actionable list[str] - A list of actionable nodes.
  • fixed dict[str, float] - A dictionary representing the fixed nodes.
  • constraints dict[str, tuple] - A dictionary representing the constraints.
  • data pd.DataFrame - A dataframe representing the data.
  • target_importance dict[str, float] - A dictionary representing the target importance.

Returns:

  • dict - A dictionary representing the optimal actions.

Example:

model.optimal_actions( ... {"x": 0.5}, ... ["x"], ... {"y": 0.5}