You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pyloess only works for fitting vectors x vs. y. It does not work properly for Matrix X with more than 1 dimensions vs. vector y. To reproduce the problem,
from numpy import *
from pyloess import loess
x = random.randn(403, 2)
y = sum(x, axis=1) + sum(random.randn(403, 2)/2, axis=1)
lo = loess(x, y)
lo.fit()
yfit = lo.outputs.fitted_values.tolist()
from mpl_toolkits.mplot3d import Axes3D
from pylab import *
fig = figure()
ion()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x[:,0], x[:,1], y)
ax.scatter(x[:,0], x[:,1], yfit, 'r')
show()
One can clearly see that the data points of y increase with the sum of x[:,0] and x[:,1], but yfit seems to be almost unaffected by the change of x. The problem seems to lie in file loessf.f in regarding to how the data is fitted (e.g. subroutine ehg127), but the Fortran code proved extremely difficult for me to understand or debug.
Not sure if someone can fix this ancient code or completely re-implement it in C/C++. It would be usefully if we can fit a dependent variable to more than one independent variables. The implementation should also correctly calculate the standard error of the fitting, since it is important in library rosely for biomedical research.
The text was updated successfully, but these errors were encountered:
Currently, pyloess only works for fitting vectors x vs. y. It does not work properly for Matrix X with more than 1 dimensions vs. vector y. To reproduce the problem,
One can clearly see that the data points of
y
increase with the sum ofx[:,0]
andx[:,1]
, butyfit
seems to be almost unaffected by the change ofx
. The problem seems to lie in fileloessf.f
in regarding to how the data is fitted (e.g.subroutine ehg127
), but the Fortran code proved extremely difficult for me to understand or debug.Not sure if someone can fix this ancient code or completely re-implement it in C/C++. It would be usefully if we can fit a dependent variable to more than one independent variables. The implementation should also correctly calculate the standard error of the fitting, since it is important in library
rosely
for biomedical research.The text was updated successfully, but these errors were encountered: