Add support for weighted least squares #694
Comments
@cesarsouza Would a bounty help speed this one along? And if so, how large? :) |
One thousand euros 😉 I am just kidding - actually the support for weights in least squares has already been implemented, but I forgot to reference this issue in the commit: 3ed8e19 If you need it urgently, you can try to clone the framework and compile from the sources (it should be only a matter of selecting the .NET framework version that you need in the configuration box and clicking the green start button in VS as shown below). But I can also try to generate a new pre-release package if you prefer, but it might indeed take a while. Regards, |
@cesarsouza Check your gmail ;) Would you mind creating a pre-release package? 🥇 |
@cesarsouza From a geometric perspective when faced with matrix singularity would you recommend adding some random noise (e.g. +- 5 RNG) to each x/y coordinate or simply removing each pair |
I am starting to prepare a new pre-release, but it might take some moments until everything compiles and is uploaded to NuGet :-) Regarding the question, I am not sure about the geometric perspective part, but in case I faced a singular matrix problem when doing linear regression I would just opt to use the SVD to solve it instead. If I am not mistaken, using the SVD should be akin to dropping the linear dependent vectors from the matrix before solving the system, but you wouldn't have to worry about doing this manually. You can solve OLS using SVD by setting the IsRobust property of the OrdinaryLeastSquares class to true before calling Regards, |
@cesarsouza That makes sense, thanks for the tip. I probably should have mentioned that i was using |
Updates GH-694: Add support for weighted least squares
Oh yeah that would be a nice thing to mention :-) but the technique is the same in both cases. It is nice that you mentioned because the IsRobust was missing from the PolynomialLeastSquares class. I've just added it. |
I am uploading the new packages to NuGet, they should be available in about 20-30 minutes :-) |
@cesarsouza Hehe 🔢 Wow, that was fast :) Looking forward playing around with |
Included in release v3.7.0. |
And update https://stackoverflow.com/questions/41619834/why-weights-in-accrod-net-simplelinearregression-have-no-effect
The text was updated successfully, but these errors were encountered: