Skip to content

Mistake in SchaffelN4 #9

@gbelouze

Description

@gbelouze

There are two mistakes, one in the LaTeX formula, and one in the loss implementation:

r"f(x, y)=0.5 + \frac{sin^2(cos(|x^2-y^2|))-0.5}{(1+0.001(x^2+y^2))^2}"
should be
r"f(x, y)=0.5 + \frac{cos^2(sin(|x^2-y^2|))-0.5}{(1+0.001(x^2+y^2))^2}"

def __call__(self, X):
    x, y = X
    res = 0.5 + (np.cos(np.sin(np.abs(x**2 + y**2)))**2 - 0.5)/(1 + 0.001*(x**2 + y**2))**2
    return res

should be

def f(self, X):
    x, y = X
    res = 0.5 + (np.cos(np.sin(np.abs(x**2 - y**2)))**2 - 0.5)/(1 + 0.001*(x**2 + y**2))**2
    return res

Also, I think it is Schaffer, not Schaffel...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions