evox.vis_tools.plot
#
Module Contents#
Functions#
A Built-in plot function for visualizing the population of single-objective algorithm. Use plotly internally, so you need to install plotly to use this function. |
|
Visualize the fitness values of the population in a single-objective optimization problem. |
|
Visualize the fitness values of the population in a single-objective optimization problem. No animation. |
|
Visualize the fitness values of the population in a single-objective optimization problem. With animation. |
|
Visualize the fitness values of the population in a multi-objective (2 objectives) optimization problem. |
|
Visualize the fitness values of the population in a multi-objective (3 objectives) optimization problem. |
API#
- evox.vis_tools.plot.plot_dec_space(population_history: List[numpy.ndarray], **kwargs) plotly.graph_objects.Figure #
A Built-in plot function for visualizing the population of single-objective algorithm. Use plotly internally, so you need to install plotly to use this function.
If the problem is provided, we will plot the fitness landscape of the problem.
- Parameters:
population_history – A list of arrays, each array represents the population of one generation.
kwargs – Additional arguments to be passed to the plotly layout.
- Returns:
A plotly figure.
- evox.vis_tools.plot.plot_obj_space_1d(fitness_history: List[numpy.ndarray], animation: bool = True, **kwargs)#
Visualize the fitness values of the population in a single-objective optimization problem.
- Parameters:
fitness_history – A list of arrays, each array represents the fitness values of the population of one generation.
animation – Whether to show the animation of the fitness values over generations.
kwargs – Additional arguments to be passed to the plotly layout.
- Returns:
A plotly figure.
- evox.vis_tools.plot.plot_obj_space_1d_no_animation(fitness_history: List[numpy.ndarray], **kwargs)#
Visualize the fitness values of the population in a single-objective optimization problem. No animation.
- evox.vis_tools.plot.plot_obj_space_1d_animation(fitness_history: List[numpy.ndarray], **kwargs)#
Visualize the fitness values of the population in a single-objective optimization problem. With animation.
- evox.vis_tools.plot.plot_obj_space_2d(fitness_history: List[numpy.ndarray], problem_pf: numpy.ndarray = None, sort_points: bool = False, **kwargs) plotly.graph_objects.Figure #
Visualize the fitness values of the population in a multi-objective (2 objectives) optimization problem.
- Parameters:
fitness_history – A list of arrays, each array represents the fitness values of the population of one generation.
problem_pf – The Pareto front of the problem. Optional.
sort_points – Whether to sort the points in the plot. This will only affect the animation behavior.
kwargs – Additional arguments to be passed to the plotly layout.
- Returns:
A plotly figure.
- evox.vis_tools.plot.plot_obj_space_3d(fitness_history, sort_points: bool = False, problem_pf: numpy.ndarray = None, **kwargs)#
Visualize the fitness values of the population in a multi-objective (3 objectives) optimization problem.
- Parameters:
fitness_history – A list of arrays, each array represents the fitness values of the population of one generation.
sort_points – Whether to sort the points in the plot. This will only affect the animation behavior.
problem_pf – The Pareto front of the problem. Optional.
kwargs – Additional arguments to be passed to the plotly layout.
- Returns:
A plotly figure.