graph LR
Estimator_Interface["Estimator Interface"]
Program_Representation["Program Representation"]
Fitness_Evaluation["Fitness Evaluation"]
Function_and_Terminal_Set["Function and Terminal Set"]
Utilities["Utilities"]
Estimator_Interface -- "Evolves & Manages" --> Program_Representation
Estimator_Interface -- "Generates & Consumes" --> Program_Representation
Estimator_Interface -- "Requests Evaluation" --> Fitness_Evaluation
Estimator_Interface -- "Configures With" --> Function_and_Terminal_Set
Program_Representation -- "Submits for Scoring" --> Fitness_Evaluation
Program_Representation -- "Composed Of" --> Function_and_Terminal_Set
Program_Representation -- "Executes Using" --> Function_and_Terminal_Set
Estimator_Interface -- "Utilizes Helpers" --> Utilities
click Estimator_Interface href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/gplearn/Estimator_Interface.md" "Details"
click Program_Representation href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/gplearn/Program_Representation.md" "Details"
The gplearn architecture is designed as a scikit-learn compatible ML toolkit for symbolic regression, centered around an Estimator Interface that orchestrates the genetic programming workflow. This interface manages the evolution of Program Representation instances, which are executable expression trees. The performance of these programs is quantitatively assessed by the Fitness Evaluation component. Programs are dynamically constructed from a predefined Function and Terminal Set, which provides the fundamental building blocks. Throughout the evolutionary process, a Utilities component offers essential support functions, ensuring efficient execution and data handling. This modular design facilitates clear data and control flow, making it suitable for pipeline-oriented diagrammatic representation.
Estimator Interface [Expand]
The primary scikit-learn-compatible entry point. Orchestrates the entire genetic programming lifecycle, including population evolution, selection, and application of genetic operations.
Related Classes/Methods:
gplearn.genetic.SymbolicRegressor:592-871gplearn.genetic.SymbolicClassifier:874-1186gplearn.genetic.SymbolicTransformer:1189-1520gplearn.genetic.BaseSymbolic:157-589
Program Representation [Expand]
Represents an individual genetic program as an executable expression tree. Encapsulates the program's structure and provides methods for execution and genetic manipulation (crossover, mutation).
Related Classes/Methods:
gplearn._program.SymbolicProgramgplearn._program.validate_program:225-236gplearn._program.build_program:165-223gplearn._program.execute:342-388gplearn._program.crossover:530-561gplearn._program.subtree_mutation:563-587gplearn._program.hoist_mutation:589-617
Defines and calculates the performance (fitness) of symbolic programs based on specified metrics. Provides the mechanism to quantify how well a program solves the problem.
Related Classes/Methods:
gplearn.fitness.make_fitness:52-101gplearn.fitness._Fitness:20-49gplearn.fitness.mean_squared_errorgplearn.fitness.accuracy_score
Manages the collection of mathematical functions and input terminals (variables, constants) that can be used to construct symbolic programs.
Related Classes/Methods:
gplearn.functions.make_function:49-121gplearn.functions._Function:18-46gplearn.functions.addgplearn.functions.mulgplearn.functions.subgplearn.functions.div
Provides general helper functions supporting the main components, such as parallel processing setup, data partitioning, and random state management.
Related Classes/Methods: