pflacco.local_optima_network_features#

pflacco.local_optima_network_features.calculate_lon_features(nodes: DataFrame, edges: DataFrame, f_opt: Optional[float] = None) Dict[str, Optional[Union[int, float]]]#

Calculation of Local Optima Network (LON) features based on a LON.

  • n_optima: Number of local optima

  • neutral_nodes_proportion: Proportion of nodes with equal fitness

  • n_funnels: Number of funnels detected in the local optima network

  • global_funnel_strength_norm: Strength of the funnel of the global/best found optimum

Parameters:
Returns:

Dictionary consisting of the calculated features.

Return type:

Dict[str, Optional[Union[int, float]]]

pflacco.local_optima_network_features.compute_local_optima_network(f: Callable[[List[float]], float], dim: int, lower_bound: Union[List[float], float], upper_bound: Union[List[float], float], seed: Optional[int] = None, stepsize: int = 2, basin_hopping_iteration: int = 100, stopping_threshold: int = 1000, precision: float = 1e-05, minimizer_kwargs: Optional[Dict[str, Any]] = None) Tuple[DataFrame, DataFrame]#

Computation of a Local Optima Network in accordance to [1]. The data is generated by several basin hopping iterations where each individual iteration executes an optimization algorithm of scipy. Nodes which are similar up to certain precision in fitness are consolidated into one and their respective edges are taken into accoutn.

Parameters:
  • f (Callable[[List[float]], float]) – Objective function to be optimized.

  • dim (int) – Dimensionality of the decision space.

  • lower_bound (Union[List[float], float]) – Lower bound of variables of the decision space.

  • upper_bound (Union[List[float], float]) – Upper bound of variables of the decision space.

  • seed (Optional[int], optional) – Seed for reproducability, by default None.

  • stepsize (int, optional) – Maximum step size for use in the random displacement, by default 2

  • basin_hopping_iteration (int, optional) – Number of independet basin-hopping runs. Each basin-hopping run consists of multiple iterations of a local search method, by default 100.

  • stopping_threshold (int, optional) – Number of basin-hopping iterations. There will be a total of basin_hopping_iteration + 1 runs of the local minimizer, by default 1000

  • minimizer_kwargs (Optional[Dict[str, Any]], optional) – Extra keyword arguments to be passed to the local minimizer scipy.optimize.minimize, by default None.

Returns:

A tuple consisting of two Pandas dataframes. The first dataframe contains information about the nodes, i.e., the local optima. The second dataframe contains information about the edges.

Return type:

Tuple[pd.DataFrame, pd.DataFrame]

References

[1] Adair, J., Ochoa, G. and Malan, K.M., 2019, July.

Local optima networks for continuous fitness landscapes. In Proceedings of the Genetic and Evolutionary Computation Conference Companion (pp. 1407-1414).