sigvaldm / localreg

Multivariate Local Polynomial Regression and Radial Basis Function Regression
GNU Lesser General Public License v3.0
46 stars 4 forks source link

Input arrays values must be floats. #2

Closed javvy closed 3 years ago

javvy commented 3 years ago

I experienced a few days of confusion because I happened to be using x-values that were type "integer" (because they were values for "years"). That produced very bizarre results. Eventually I realized that "locreg" assumes that the x-values ar type "float". Multiplying my x-value array by "1.0" fixed things up.

RECOMMEND that documentation specify that the x and y input arrays need to contain type "float" values.

sigvaldm commented 3 years ago

Thank you for your feedback, I had not noticed this. I tried to reproduce the error, and it appeared to me that integer x and y actually worked fine, but integer x0 caused the returned values to be cast to integer. Could it be that x0 were also integer in your case? If so I have now fixed the error, and it will be fixed in the next version of localreg.

javvy commented 3 years ago

I left x0 at the signature default, but wouldn't then have it's values set to x,   which in my case are python integers?  "You won't find the right answers if you don't ask the right questions!" (Robert Helmbold, 2013)

On Wednesday, March 17, 2021, 06:10:29 AM MST, Sigvald Marholm ***@***.***> wrote:  

Thank you for your feedback, I had not noticed this. I tried to reproduce the error, and it appeared to me that integer x and y actually worked fine, but integer x0 caused the returned values to be cast to integer. Could it be that x0 were also integer in your case? If so I have now fixed the error, and it will be fixed in the next version of localreg.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

sigvaldm commented 3 years ago

Yes, you are right, x0 defaults to x. In that case I believe it is fixed, and I'm closing the issue.

javvy commented 3 years ago

Thanks "You won't find the right answers if you don't ask the right questions!" (Robert Helmbold, 2013)

On Wednesday, March 17, 2021, 06:28:20 AM MST, Sigvald Marholm ***@***.***> wrote:  

Yes, you are right, x0 defaults to x. In that case I believe it is fixed, and I'm closing the issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.