Problem with constraints #305
Replies: 0 comments 4 replies
-
Hi @JulesArcher, Thanks for raising this. Looks like a bug! I'll fix this straight away. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Fixed on 0.8.1 (registry will update in ~1 hour). Let me know if it works for you. Cheers, |
Beta Was this translation helpful? Give feedback.
-
btw, note that since you aren't passing using SymbolicRegression
X = randn(Float32, 5, 100)
y = 2 * cos.(X[4, :]) + X[1, :] .^ 2 .- 2
options = SymbolicRegression.Options(
binary_operators=(+, *, /, -,^),
unary_operators=(cos, exp),
loss=L2DistLoss(),
constraints=[(^)=>(-1, 3)]
)
niterations = 5
hallOfFame = EquationSearch(X, y, niterations=niterations, options=options, numprocs=4) No use of If you do want to do everything manually, you should change your code to: using Distributed
procs = addprocs(4)
using Pkg
project_path = splitdir(Pkg.project().path)[1]
@everywhere procs begin
# Activate project on processes:
Base.MainInclude.eval(quote
using Pkg
Pkg.activate($$project_path)
end)
end
@everywhere using SymbolicRegression
X = randn(Float32, 5, 100)
y = 2 * cos.(X[4, :]) + X[1, :] .^ 2 .- 2
options = SymbolicRegression.Options(
binary_operators=(+, *, /, -,^),
unary_operators=(cos, exp),
loss=L2DistLoss(),
constraints=[(^)=>(-1, 3)]
)
niterations = 5
hallOfFame = EquationSearch(
X, y,
niterations=niterations,
options=options,
procs=procs
)
rmprocs(procs) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am trying to use the constraints option without success as follows:
Output gives a type error as follows:
Any ideas as to what I'm doing wrong?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions