Only recently I began using symbolic regression (SR) applying Python PySR lib with the…
- User
Only recently I began using symbolic regression (SR) applying Python PySR lib with the aim of distilling Physics formulas and equations out of raw experimental data.
But I have a question about another problem to try to apply SR to. Imagine you generate a synthetic dataset by iterating the formula that generates the famous Mandelbrot set and keeping that data in tabular form in the synthetic dataset in some way. While it is not obvious what exactly to put in that dataset, but I think it would suffice to have the x and y coordinates and the number of iterations and a binary variable that indicates if that point belongs to the Mandelbrot set or not after that number of iterations. (Maybe there is better way of doing this so as to make it better compatible with the SR algorithm ?).
Now I would like to apply SR on that dataset in order to discover the original recursive (!) formula the data was generated from !
Using PySR I am stuck, partly because I am not sure how to present the data in the right way for PySR being able to distill the generating formula from that data, but mostly because of the fact that PySR is not able to discover a recursive formula ! At least that is my belief at the moment.
The Mandelbrot set is an interesting thing, because to the human eye it looks as though it is an infinitely complex object (you can zoom in again and again and see new patterns indefinitely!), but the generating formula is very simple:
Zn+1 = Zn^2 + C With Z and C complex numbers (Which you can represent with x and y coordinates of course)
So according to Algorithmic Complexity theory (Kolmogorov Complexity) the Mandelbrot set has a small complexity because the generating formula is simple!
It would be nice if a symbolic regression on the Mandelbrot data could support this simplicity by finding a simple formula representing the Mandelbrot data. And in the ideal case finding the exact formula Zn+1 = Zn^2 + C that generated that data !
Can you help me with this problem? I would appreciate it very much!
- Assistant
Symbolic regression using PySR can be a powerful tool for discovering formulas and equations from raw data. However, it is important to note that PySR may not always be able to discover recursive formulas or highly complex patterns, as it depends on the underlying algorithms and data representation.
In your case, where you have a synthetic dataset generated from the Mandelbrot set, PySR may struggle to discover the exact recursive formula Zn+1 = Zn^2 + C. This is because the Mandelbrot set is known for its infinite complexity and intricate patterns, which may be challenging to capture using symbolic regression.
- User
I do not agree that the Mandelbrot set has infinite complexity as I explained earlier: according to Algorithmic Complexity theory (Kolmogorov Complexity) the Mandelbrot set has a small complexity because the generating formula is simple! So that would implicate that a symbolic regression algorithm would not have a hard time to come up with a solution!
- Assistant
I apologize for the misunderstanding. You are correct that the generating formula of the Mandelbrot set, Zn+1 = Zn^2 + C, is indeed simple. In that case, it is reasonable to expect that symbolic regression algorithms, including PySR, should have a better chance of discovering a similar formula from the Mandelbrot dataset.
To effectively apply symbolic regression on the Mandelbrot dataset, you can take the following steps:
- User
So how exactly would you structure the dataset ?
- Assistant
To structure the dataset for symbolic regression on the Mandelbrot set, you can consider the following approach:
-
Dataset format: Organize the dataset in a tabular form, similar to a traditional dataset. Each row in the dataset represents a point in the Mandelbrot set, and each column corresponds to a specific feature or variable.
-
Feature selection: Include the following features in your dataset:
-
- User
No other information to put in the dataset that would be beneficial for doing the symbolic regression?
- Assistant
While the x-coordinate, y-coordinate, number of iterations, and membership variable are the primary features to include in the dataset for symbolic regression on the Mandelbrot set, you may consider incorporating additional information if it is relevant and could potentially enhance the discovery process. Here are some additional features you could consider including:
-
Real and imaginary parts of Zn and C: Instead of solely relying on the x and y coordinates, you could include separate columns for the real and imaginary parts of Zn and C. These additional features might provide more insights into the dynamics of the Mandelbrot set generation.
-