Replies: 2 comments 1 reply
-
Thanks @MrChewi. It's weird the For the question about the constraint that heat capacity = 0 when temperature = 0, what I like to do for asymptotic constraints is weight points according to how important they are to fit. For example, you could do weights = ones(size(y))
# If y[end] is the C=0, T=0 point, then
weights[end] = 10_000
mach = machine(model, X, y, weights) So when you fit, it will emphasize the C=0,T=0 point a lot more. Simply increase the weighting of that point as needed. |
Beta Was this translation helpful? Give feedback.
-
I confirm that setting I made a pull request here: MilesCranmer/SymbolicRegression.jl#289 to enable the following syntax: model = SRRegressor()
mach = machine(model, X, y)
fit!(mach)
# Predict with 3rd equation:
predict(mach, (data=X, idx=3))
# Predict with most complex equation:
r = report(mach)
predict(mach, (data=X, idx=lastindex(r.equations))) which is similar to how PySRRegressor works on the Python side. This is also nice because it works for multi-output equations (pass an array for Would be great if you could try it out and let me know if it gets the job done! Edit: this is live on SymbolicRegression 0.23.2! |
Beta Was this translation helpful? Give feedback.
-
Hi Everyone,
I'm thrilled and very excited about using SymbolicRegression.jl tool. I'm quite new so I'm trying to learn the bits ans peaces that offers the package. I have used a simple example where I have some experimental data and tried to recover the equation behind it.
it is based on an article I'm working on which describes The heat capacity of water ice in interstellar or interplanetary conditions.
It worked quite nicely and fitted pretty much the experimental data I had. Nevertheless, I had 2 issues : one of which was with using the selection_method to select an expression.
I used the same expression as described in : https://astroautomata.com/SymbolicRegression.jl/dev/
which is :
but the output result kept being the same as the best_indx expression function weirdly I don't know why (see the model below).
The second issue I had was how badly the equation found fitted the experimental data between a given range of data and that after different attempt with number of population and constraints. that I assume it is physically understandable as between T=0K and T=2.5 K there is another equation that governs that area. That being said, I don't know if there is a possibility to incorporate that as a constraints or maybe something else to improve the prediction ? (See Below the plot)
Thank you all for your future response, hope that they will be helpful. Have a good day
Haithem.
Beta Was this translation helpful? Give feedback.
All reactions