piecewise-regression
piecewise-regression copied to clipboard
Abbrivations
Hello,
I'd like to express my gratitude for your efforts in creating this valuable tool.
I have a few suggestions that I believe could enhance the user experience and improve the documentation:
-
Improved Variable Naming in
get_results()
: Theget_results()
function returns a wealth of useful information. However, the use of abbreviations such asse
,t_stat
,p_t
,bic
, orrss
might be challenging for users from diverse fields. See: this Software Engineering Stack Exchange post. -
Example Usage for
get_results()
andget_params()
in Documentation: Whileget_results()
andget_params()
are excellent methods, the documentation lacks examples illustrating their usage. Adding clear examples, possibly with simple mathematical models like the ones below, would significantly benefit users:$$ y = const + α1⋅x $$
$$ y = const - β1+ α2⋅(x − breakpoint1) $$
-
Introduce a Function for Returning a List of Fits: It would be valuable to introduce a new function that returns a list of fits, such as
[fit_1, breakpoint1, fit_2, breakpoint2]
. Each fit (e.g.,fit_1
) could be a callable function that acceptsxs
and returns correspondingys
based on the fit.
Thank you for considering these suggestions. I believe these enhancements will contribute to the overall usability and understanding of your tool.
I already forked the repository and fixed the Variable Naming in get_results()
. I can request a merge. However Wanted to share my thoughts here first.
Hi. Thank you for the suggestions! Great to get some feedback.
- Yes I agree it is better not to abbreviate variable names. That's great that you have forked the repo and made the changes. yes please suggest a merge and I will check it.
- Yes I agree that adding something like that to the docs would be beneficial. I can do that or please feel free to go ahead and fork it again/add it to the existing fork if you would like to suggest specific changes.
- I'm not sure the context of returning a list of fits? Do you mean return the fits as they were iterated during the optimisation algorithm?
Thank you Charlie
Nope. I maen returning lisf of callable functions that are fits to each segments. For example:
f1 = np.poly1d([0, results["alpha1"], results["const"]])
f2 = ...
fits = [f1, f2]