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
