Skip to content

Dimensional constraints don't seem to be applied #423

Answered by MilesCranmer
SrGonao asked this question in Q&A
Discussion options

You must be logged in to vote

@SrGonao btw, it should be pretty easy to turn off the "wildcard unit" functionality, so that all learned constants are dimensionless. We just need to add a boolean parameter to the Options struct in SymbolicRegression.jl. That parameter would just end up here:

    t.constant && return WildcardQuantity{Q}(Quantity(t.val::T, R), true, false)

https://github.com/MilesCranmer/SymbolicRegression.jl/blob/5c95478d8a01f2c6b6b54da26615c07fb6d3aee1/src/DimensionalAnalysis.jl#L121

It would set that true to false if the user chooses to disable the wildcard units. That's literally all that's needed. Now I just need to find some time to add it...

Replies: 9 comments 7 replies

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies

This comment has been hidden.

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@SrGonao
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@SrGonao
Comment options

@MilesCranmer
Comment options

Comment options

You must be logged in to vote
4 replies
@SrGonao
Comment options

@MilesCranmer
Comment options

Answer selected by SrGonao
@SrGonao
Comment options

@MilesCranmer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
PySR PySR-related discussion SymbolicRegression.jl SymbolicRegression.jl-related discussion
2 participants
Converted from issue

This discussion was converted from issue #422 on September 07, 2023 13:09.