jrckln / Bendyourspline

2 stars 0 forks source link

What is the optimal fit? #33

Open AngelikaGeroldinger opened 3 years ago

AngelikaGeroldinger commented 3 years ago

At the moment, the optimal fit for FP for instance is the "optimal fit" given the chosen powers (which is very nicely explained in a help box appearing when moving the mouse over the box "optimal fit"). Especially with FP, the optimal fit is defined in the literature, should we use the standard algorithm to choose the powers for the optimal fit?

Similarly with splines: If the user presses "optimal fit", currently only the coefficients are modified. Maybe also the positions of the knots (e.g. according to Harrell's suggestions) and perhaps also the number of knots (how? in relation to sample size?) should be modified. For B-Splines there is also the degree, maybe this could be fixed (not changed when pressing "optimal fit").

matherealize commented 3 years ago

I can see uses for both options - optimal fit overall, and optimal fit given some specifications.

I could imagine the following workflow, starting from the current version: have a radio button "Optimal fit" show the overall optimal fit, as good as we can automate it. In addition, the button "Optimal fit" with explanation "Given current powers" or similar, should set the black line according to the best fit with given user specifications. For FPs, these are the powers (simple), for splines I'd say that these encompass the knot positions. This reflects our own workflow: when we fit a model ourselves, we need to specify knot positions first, and the model does the coefficients. We can discuss good ways to choose knots in the about sections.

This would enable the user to experiment and "chase" after the best fit to the data (yellow line) using his own fit (the black line). If they need help, the "Optimat fit" button can guide them and display how good a fit they can get using their current setup.