Genetic algorithm visualizer is used to show clustering results that are specific for this particular algorithm: clusters, evolution of global and local optimum. More...
Static Public Member Functions | |
def | show_evolution (observer, start_iteration=0, stop_iteration=None, ax=None, display=True) |
Displays evolution of fitness function for the best chromosome, for the current best chromosome and average value among all chromosomes. More... | |
def | show_clusters (data, observer, marker='.', markersize=None) |
Shows allocated clusters by the genetic algorithm. More... | |
def | animate_cluster_allocation (data, observer, animation_velocity=75, movie_fps=5, save_movie=None) |
Animate clustering process of genetic clustering algorithm. More... | |
Genetic algorithm visualizer is used to show clustering results that are specific for this particular algorithm: clusters, evolution of global and local optimum.
The visualizer requires 'ga_observer' that collects evolution of clustering process in genetic algorithm. The observer is created by user and passed to genetic algorithm. There is usage example of the visualizer using the observer:
|
static |
Animate clustering process of genetic clustering algorithm.
This method can be also used for rendering movie of clustering process and 'ffmpeg' is required for that purpuse.
[in] | data | (list): Input data that was used for clustering process by the algorithm. |
[in] | observer | (ga_observer): Observer that was used for collection information about clustering process. Be sure that whole information was collected by the observer. |
[in] | animation_velocity | (uint): Interval between frames in milliseconds (for run-time animation only). |
[in] | movie_fps | (uint): Defines frames per second (for rendering movie only). |
[in] | save_movie | (string): If it is specified then animation will be stored to file that is specified in this parameter. |
|
static |
Shows allocated clusters by the genetic algorithm.
[in] | data | (list): Input data that was used for clustering process by the algorithm. |
[in] | observer | (ga_observer): Observer that was used for collection information about clustering process. |
[in] | marker | (char): Type of marker that should be used for object (point) representation. |
[in] | markersize | (uint): Size of the marker that is used for object (point) representation. |
|
static |
Displays evolution of fitness function for the best chromosome, for the current best chromosome and average value among all chromosomes.
[in] | observer | (ga_observer): Genetic algorithm observer that was used for collecting evolution in the algorithm and where whole required information for visualization is stored. |
[in] | start_iteration | (uint): Iteration from that evolution should be shown. |
[in] | stop_iteration | (uint): Iteration after that evolution shouldn't be shown. |
[in] | ax | (Axes): Canvas where evolution should be displayed. |
[in] | display | (bool): If 'True' then visualization of the evolution will be shown by the function. This argument should be 'False' if you want to add something else to the canvas and display it later. |