liveBook · Manning

Scaler gene

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

A scaler gene is an encoded evolutionary variable whose value specifies a scaling factor for an input feature.

A scaler gene is an encoded evolutionary variable whose value scales one input feature. A genetic algorithm evolves a sequence of these genes alongside a genetic-programming equation, allowing feature weights to be tuned for regression. section 4.3.1

In the coevolutionary regression setup:

  • The scaler sequence contains one gene per input feature; the BH dataset uses 13 genes. section 4.3.1
  • Fitness evaluation multiplies the feature matrix by the scaler values before applying the compiled GP equation. section 4.3.1
  • The GA can evolve faster than GP, using a 10-to-1 evolution-rate relationship to fine-tune equation inputs. section 4.3.1

Coevolved symbolic regression

A GA individual supplies feature scalers while a GP individual supplies a derived equation. Both populations receive fitness evaluations: GP candidates pair with the best GA individual, and GA candidates pair with the best GP individual. section 4.3.1

Listing 4.15 EDL_4_3_COEV_Regression.ipynb: The fitness evaluation
def evalSymbReg(individual, points):    
    func = toolbox_gp.compile(expr=individual)             #1
    p = np.expand_dims(points, axis=1)                     #2
    x = X * np.asarray(p)                                  #3
    diff = math.sqrt(np.sum((func(*x.tolist()) - y)**2))   #4
    return diff,

Inspect the compact evaluation function that compiles the GP equation, scales the inputs, and computes regression error. section 4.3.1

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Explains representation, matrix application, paired fitness evaluation, and separate GA and GP evolution rates.
Examples
Uses the BH dataset, 13 input features, DEAP toolboxes, and an evalSymbReg fitness function.
What you can do after
Apply it via DEAP-style GA and GP populations to evolve feature weights for a derived regression equation.
How it connects
Connects genetic algorithms, genetic programming, symbolic regression, feature scaling, and coevolution.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.