At the same time meet the dimension and a priori #664
Unanswered
jackeuylov
asked this question in
Q&A
Replies: 1 comment
-
The default loss is here: https://github.com/MilesCranmer/SymbolicRegression.jl/blob/cd23a6e25c64d00565c3ae3905d06dc3c63033ed/src/LossFunctions.jl#L45-L75 In particular the dimensional regularization is calculated on this line: https://github.com/MilesCranmer/SymbolicRegression.jl/blob/cd23a6e25c64d00565c3ae3905d06dc3c63033ed/src/LossFunctions.jl#L71 So within a custom loss you could add a manual call, like loss_val += SymbolicRegression.LossFunctionsModule.dimensional_regularization(tree, dataset, options) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Miles,
In my research, I need to make some kind of a priori of the equation form, and at the same time, I need to satisfy the balance of dimensions. However, when I custom-designed the loss, I found that the penalty of the dimensional part was offset. Here is my code example :
I found that the above loss does not deal with the problem of dimension.
Could you help me see how to add dimensional constraints to custom loss ?
Looking forward to your reply! Thanks.
Beta Was this translation helpful? Give feedback.
All reactions