-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Normalize double min and max value returns NaN #2798
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
Comments
Trainers in ML.NET use Now, the data is processed through the pipeline, but when the trainer iterates through the data, it automatically ignores infinite values. That should toss just those two infinite values. However, it looks like all of your values are being ignored. My best guess is that the I'll investigate further to repro and make sure I know exactly where the issue is. |
Just want to clarify,
Using NormalizingEstimator.MeanVarColumn,
I see:
I try out some other boundary values: double.PositiveInfinity, double.NegativeInfinity, double.NaN, e.g., :
I see the code snippet above:
Should I expect similar output as param.Scale== 0 and param.Offset == 0 with the input of double.min and double.max? |
I added more detail on our handling of +/- Infinity in normalizers in issue #3885. |
I have investigated this bug in more detail. The behavior is unfortunate but expected. If you are dealing with very large values in your dataset you should consider using Using the The calculation of the mean of a streaming sequence of data uses the following formula (sorry but github markdown does not support latex): And the computation of the variance uses the second moment, and the formula for the computation of the second moment of a streaming sequence is:
In both cases, the term Would switching to the |
Thanks Artidoro, we require a parameter |
System information
Issue
I see a feature in transformedData.Preview, which is all NaN, for each row. I use SDCA trainer
The
pipeline.Fit(transformedData)
fails and throw an exception say "train with 0 instances"Source code / logs
Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.
The text was updated successfully, but these errors were encountered: