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
Once calculated, save the singular value decomposition (svd) of the basis matrix, U, sigmaVector,V and maybe U'*y. Then we should be able to recalc betas more quickly.
Provide an function for updating lambda.
Sticking with a functional approach, maybe the spline object returned from a smoothing spline, also includes _meta information for recalculating and an update or with function (or some other word that might be more suggestive that a new spline is returned rather than the original spline is mutated?)
constspline=awaitsimpleSmoothingSpline(data,{lambda: 1});// first run so a bit slower, but work is saved to _metaconstnewSpline=awaitspline.update({lambda: 2})// faster since we can reuse previous work
Where spline might look like:
{points,// spline pointsfn,// function to generate spline y for given x_meta: {type: 'smoothing'work: {svd,
Utranspose,
y,}update,// can use _meta.work to update and return a new spline object}
Or, rather than moving state around in objects, move (back) to a OO implementation?
Possible OO API:
constspline=newSimpleSmoothingSpline(data,{lambda: 1});constpoints=awaitspline.getPoints();// first run so a bit slower, but work is savedconstnewPoints=awaitspline.update({lambda: 1000}).getPoints();// faster since we can reuse previous work
The text was updated successfully, but these errors were encountered:
Random thoughts for later:
U, sigmaVector,V
and maybeU'*y
. Then we should be able to recalc betas more quickly.Sticking with a functional approach, maybe the spline object returned from a smoothing spline, also includes
_meta
information for recalculating and anupdate
orwith
function (or some other word that might be more suggestive that a new spline is returned rather than the original spline is mutated?)Where spline might look like:
Or, rather than moving state around in objects, move (back) to a OO implementation?
Possible OO API:
The text was updated successfully, but these errors were encountered: