liveBook · Manning

Function approximation

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

A function approximator is a computational model that estimates the outputs of a target function without necessarily reproducing its exact form.

Function approximation estimates the outputs of a target function without necessarily reproducing its exact form. In machine learning, the approximator maps inputs to results or predictions; evolutionary methods can instead evolve the function itself. section 12.1 section 4.4

The method can use deep learning, evolutionary strategies, or differential evolution. Evolutionary strategies control mutation with additional strategy vectors, while differential evolution reduces differences between candidate solutions without calculus and can address continuous or discontinuous functions. section 4.4 section 4.5

A practical evolutionary workflow includes:

  • Define a target function and a set of expression operators. section 12.1
  • Compile each candidate expression, generate predictions for sample inputs, and calculate mean absolute error as fitness. section 12.1
  • Configure genes, head length, chromosomes, mutation, crossover, population size, generations, and elite retention. section 12.1
  • Inspect the best individual, simplify its expression, and export its expression tree. section 12.1

Evolving a linear function with Geppy

Set the target to f(x1) = 6*x1 + 22, use addition, subtraction, multiplication, and protected division as operators, then evolve a population of 100 individuals for 100 generations. Simplifying the best individual can produce 6*x1 + 22. section 12.1

Figure 12.2 Evolutionary learning

Use the evolutionary-learning figure to trace how candidate functions are evaluated and improved. section 12.1

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

How deep it goes
Defines the role, compares methods, and walks through a runnable Geppy implementation without developing mathematical theory.
Examples
Uses continuous polynomials, discontinuous and complex functions, and a Geppy target of 6*x1 + 22.
What it assumes
Assumes practical Python and machine-learning familiarity while demonstrating target functions, fitness evaluation, and evolutionary configuration.
What you can do after
Build it from scratch by configuring Geppy to evolve, evaluate, simplify, and visualize an executable function.
How it connects
Connects function approximation with deep learning, evolutionary strategies, differential evolution, gene expression programming, and loss functions.

Also explained in

Compare how 2 books explain function approximation →

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.