I was fiddling with the excellent SymbolicRegression.jl when I had issue executing this code:
using SymbolicRegression
A = rand(Bool, (1000, 5))
B = @. (A[:, 1] | A[:, 2]) & (!A[:, 3]) ⊻ A[:, 4]
# Define options for symbolic regression
options = SymbolicRegression.Options(;
binary_operators=[&, |, ⊻],
unary_operators=[!],
progress=true,
verbosity=1,
)
# Run symbolic regression
hall_of_fame = equation_search(
A,
B;
niterations=300,
options=options,
parallelism=:serial
)
# => ERROR: InexactError: Bool(-100.0)
Does SymbolicRegression support binary data type?
Maybe there is a way to make it work.