class FeedForwardIndividual(parents_genes=None, population=None, MAX_NEURONS=64, MAX_LAYERS=10, **kwargs)[source]#

Individual for a feed forward neural network.

Parameters:
  • parents_genes – list of genes from parents

  • population – population object that this individual belongs to

  • MAX_NEURONS – maximum number of neurons allowed

  • MAX_LAYERS – maximum number of layers allowed

  • NUM_PARENTS – number of parents used for crossover

  • **kwargs – arguments to be passed to Keras

Returns:

None

_crossover(parents_chromosomes)[source]#

Crossover genes from parents to create new genes.

_evaluate_model()[source]#

Evaluate the model.

_train_model()[source]#

Train the model. :return:

get_fitness()[source]#

Get the fitness of the individual.

mate(other_individual)[source]#

Mate with another individual. :param other_individual: Individual to mate with. :return: