The loss doesn't match the Latex formula. I suggest the following corrected implementation
def f(self, X):
d = X.shape[0]
j = np.arange(1, d + 1)
res = np.sum(
[
np.sum((j + self.beta) * (X**i - (1 / j) ** i)) ** 2
for i in range(1, d + 1)
]
)
return res
The loss doesn't match the Latex formula. I suggest the following corrected implementation