mathnet / mathnet-numerics

Math.NET Numerics

Home Page:http://numerics.mathdotnet.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Power return NaN

engrwuang opened this issue · comments

commented

I would like to raise a question. When I use Fit.Power, it returns NaN, but if I change the model to Polynomial, there is no such error. I want to know if there are any restrictions on the Power method. I analyzed the program step by step and found that NaN occurred in Power's LinearCombination. I hope to get your answer.
Here is my code:
double[] y = y_data.ToArray(); double[] x = x_data.ToArray(); (double,double) powerFitResult = Fit.Power(x, y);
By the way, I normalized the data, will it make a difference?