Plots

plot_fitness_evolution(estimator[, metric])

Parameters

plot_search_space(estimator[, height, s, …])

Parameters

plot_parallel_coordinates(estimator[, features])

Parameters

sklearn_genetic.plots.noise(score)[source]
Parameters
score: Series

The score column from the logbook data of GASearchCV

Returns
Noise to be added to each element of the score to avoid non-unique bin edges
sklearn_genetic.plots.plot_fitness_evolution(estimator, metric='fitness')[source]
Parameters
estimator: estimator object

A fitted estimator from GASearchCV

metric: {“fitness”, “fitness_std”, “fitness_max”, “fitness_min”}, default=”fitness”

Logged metric into the estimator history to plot

Returns
Lines plot with the fitness value in each generation
sklearn_genetic.plots.plot_parallel_coordinates(estimator, features: Optional[list] = None)[source]
Parameters
estimator: estimator object

A fitted estimator from GASearchCV

features: list, default=None

Subset of features to plot, if None it plots all the features by default

Returns
Parallel Coordinates plot of the non-categorical values
sklearn_genetic.plots.plot_search_space(estimator, height=2, s=25, features: Optional[list] = None)[source]
Parameters
estimator: estimator object

A fitted estimator from GASearchCV

height: float, default=2

Height of each facet

s: float, default=5

Size of the markers in scatter plot

features: list, default=None

Subset of features to plot, if None it plots all the features by default

Returns
Pair plot of the used hyperparameters during the search