Skip to content

feat: Add SMGPRegressor (Smooth Multifunction Genetic Programming)#207

Closed
MichalicekPetr wants to merge 1 commit into
cavalab:masterfrom
MichalicekPetr:add-smgp
Closed

feat: Add SMGPRegressor (Smooth Multifunction Genetic Programming)#207
MichalicekPetr wants to merge 1 commit into
cavalab:masterfrom
MichalicekPetr:add-smgp

Conversation

@MichalicekPetr

Copy link
Copy Markdown

Description

This Pull Request introduces SMGPRegressor (Smooth Multifunction Genetic Programming), a novel symbolic regression method designed to address the challenges of non-linear, discontinuous fitness landscapes and efficient hardware acceleration (GPGPU mapping) in traditional Genetic Programming Algorithms (GPAs).

The core of this method is based on the research paper "Smooth multi-function in evolutionary algorithm concept" (Michalicek & Brandejsky, University of Pardubice).

Scientific Background & Innovation

Traditional GPAs suffer from low causality in their search space: a single mutation or crossover event (e.g., swapping a multiplication for a sine operator) causes a radical, discontinuous jump in the fitness landscape.

SMGPRegressor solves this by eliminating the traditional structural evolution of trees during parameter tuning. It embeds a perfect binary tree of Multifunctions parameterized by a single control variable Gamma.

Unlike previous versatile/smooth functions (e.g., Diviplication, Subdition, or Versatile Functions with multiple control variables that artificially inflate the dimensionality of the fitness landscape), our proposed method maps n pairs of basis functions into a single continuous template controlled by a single parameter Gamma.

The transition between functions is smoothly continuous (C^1 class continuity). To resolve the non-differentiable sharp bounds of classic triangle/sawtooth membership functions, we utilize a Fourier series approximation of the triangle wave. This guarantees that the left and right derivatives match at all boundary points, smoothing the fitness landscape and enabling highly efficient continuous parameter optimization.

Key Advantages for Benchmarking

  • Smoother Fitness Landscape: The algorithm converts a discrete structural search into a continuous parameter optimization space (G vector tuning), drastically decreasing the risk of getting trapped in local optima.
  • GPGPU Optimization: The fixed, perfect binary tree structure eliminates the overhead of transferring complex tree graphs between CPU and GPU. The individual can be flattened into a single compact vector/stream of numbers, making it highly suitable for high-throughput parallel computing.

Architecture & Integration Details

The repository has been structured strictly following the SRBench Contribution Guide:

  • Separation of Source Code: The repository contains no raw engine source code. It utilizes install.sh to pull the stable engine components from our source repository during the benchmarking setup.
  • Scikit-Learn Compatibility: The SMGPRegressor fully implements the standard .fit(X, y) and .predict(X) API.
  • Metadata & Requirements: Includes a fully compliant metadata.yml matching the execution requirements.
  • Time and Random Constraints: The implementation supports the maxSeconds parameter and correctly exposes the random_state attribute for reproducibility.
  • SymPy Export: The global model(est, X=None) function maps internal representations back to standard, clean SymPy mathematical equations matching the input feature names of the training pd.DataFrame.

Checklist

  • API is fully compatible with scikit-learn (fit, predict).
  • Python >= 3.7 compatibility tested.
  • random_state attribute exposed and respected.
  • Clean folder structure containing metadata.yml, regressor.py, install.sh, and LICENSE.
  • model(est, X=None) returns a valid SymPy-compatible string with correct column mapping.
  • install.sh does not require sudo permissions.
  • Source code isolated and pulled via install.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant