Symbolic regression fails this exponential pattern

MWE:

import SymbolicRegression: SRRegressor
import MLJ: machine, fit!, predict, report


X = (a=[(10.0-x)^x for x in 1:5],)

Y = [1.0,2.0,3.0,4.0,5.0]

model = SRRegressor(
    niterations=50,
    binary_operators=[+, -, *,^]
)


mach = machine(model, X, Y)

fit!(mach)

report(mach)

Symbolic regression fails to find this pattern. If you’re a maintainer of the package, you know better than me if it warrants investigation. This is a simple report from me. Thank you.

Are the X, Y switched here? I think you might have wanted to write

X = (a=[1.0,2.0,3.0,4.0,5.0],)

Y = [(10.0-x)^x for x in 1:5]
1 Like

Oops… my point still holds though. It still fails after swapping the variables.