-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add forced intercept = 0 option to OrdinaryLeastSquares #412
Comments
Hi @r-molins-mrp, Thanks very much for your contribution. Sorry for the slow response. Could you please change the PR to merge into the I update the Changelog just to capture this change. I am having trouble getting your branch onto my local machine. Bare with me on that. In the meantime could you add an example to the docstring to demonstrate how this would be used? I know it is very straight forward but always good to have an example. Cheers, |
Hi @r-molins-mrp , I've got it working on my local machine. It looks good. Some questions below. I'm not following the math so some of my questions may be inappropriate.
I also committed a few changes to the formatting to match PEP8 formatting rules. I use PyCharm and it highlights when these are broken. Quite useful. Thanks again for your effort in this! |
Hi @stephenholleran , thanks for your comments, these are all good points. Answers below:
Thanks for the tip on formatting rules; I use VS Code with linting module, but it doesn't seem to be capturing this PEP8 stuff. See #420 |
Hi @r-molins-mrp, Thanks for all that. I made some PEP8 tidying up, added an example and test for running by dir sector and a bit of refactoring. Let me know that you are happy with all of those and I think we are good to merge? I have discovered a bug using one of the newer versions of pandas so I'll be making this fix and push a new release ASAP. This will go with that. Cheers, |
Thanks a lot @stephenholleran for that, all good with me for release - sorry I forgot the sectorwise tests. |
Yep, painful. Well, a warning in a previous version that we didn't catch. Thanks. |
Hello Brightwind, and thanks for your great package.
A suggestion from our side; I don't think your
correlation
package allows the possibility to fit a simple y = ax relation (with a forced intercept of 0 then). It can be useful, for LiDAR vs. mast validation for instance, or overall checking the trends between two anemometers.It should be a simple change hopefully, the
_leastsquare
function in classOrdinaryLeastSquares
Should be edited as
Proof of concept, taken from the documentation and SOW:
returns:
I've doubled check with Excel, it returns the same:
force intercept in Excel.xlsx
Would you mind implementing that? I would have done it myself but I don't currently have a Brightwind Python environment set-up with Github and VS.
Thanks!
The text was updated successfully, but these errors were encountered: