-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
control PSRN's operators via SR.jl Options #21
Comments
Currently, the operators for PSRN are directly set in the source code. I hope to be able to set them directly through the options in SR.jl, but I haven't decided yet whether to adapt automatically or set them separately. |
@MilesCranmer Any thoughts on this? SymbolicRegressionGPU.jl/src/SymbolicRegressionGPU.jl Lines 1147 to 1167 in 24211bd
SymbolicRegressionGPU.jl/src/PSRNmodel.jl Lines 49 to 64 in 24211bd
|
Why are the strings needed? Is it to pass it back to Python? If you were to do things from scratch I would probably just write a single kernel like struct Kernel{F<:Function}
f::F
end
(k::Kernel)(x, y) = k.f(x, y)
#= or extra functions with ::Kernel as an argument =# and then define mappings like to_string(::Base.Fix{typeof(+)}) = "Add"
to_string(::Base.Fix{typeof(*)}) = "Mul"
to_string(::Base.Fix{typeof(/)}) = "Div" and so on |
p.s., instead of |
No description provided.
The text was updated successfully, but these errors were encountered: