I want to calculate the RSS from a given data set and a given fit function, but can’t find an function that does this.
df3 = pd.DataFrame({'x':[1,1,1], 'y':[2,3,2]})
res = np.sum(np.square(df3['x'] - df3['y'])) # what function is equivalent to this?
print(res)
All solutions on the internet either implement this by hand or get the value from the fitting process. Manually implementing the function is an option, but not preferred.
I assume either numpy or scip have such function implemented, but I can’t find it.
Apologies, if this is already answered elsewhere and thank you in advance.