Closed Petkomat closed 3 years ago
You are kindly doing something wrong with the code above.
The line
s = {"x": ['a', 't', 'v0'], "start": "S", "const": "C"}
should be used instead of
s = {"x": ['v0', 'a', 't'], "start": "S", "const": "C"}
producing the new output:
# error(model): 4.8409e-28, p(model): 1.5000e-02, model: 0.499999999999985*a*t**2 + 1.00000000000001*t*v0
# MSE1 0.0
The reason is that key "x"
in symbols
argument in generate_models()
determine which terminal symbols represent which columns (in dataset without target column) in order from the first to the last column.
Mean squared error is used, if everything works correctly.
Many thanks. Confirming that the solution resolved the issue.
The code below
s = 0.5 a t^2 + v0 * t
.The model candidates are as expected, however, I got some weird model errors:
i.e., allegedly, the first model has a lower error than the second one. When I compute mean squared error for both models, these are the results: