-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
untriagedNew issue has not been triagedNew issue has not been triaged
Description
System Information (please complete the following information):
- OS & Version: Any
- ML.NET Version: latest
- .NET Version: [e.g. .NET 5.0]any
Describe the bug
In ProbabilityFunctions.cs, there are these lines :
// This is very inefficient... fortunately we only need to compute it very infrequently.
double[] c = new double[1000];
c[0] = 1;
for (int k = 1; k < c.Length; ++k)
{
for (int m = 0; m < k; ++m)
c[k] += c[m] * c[k - 1 - m] / (m + 1) / (m + m + 1);
}
even if the class is internal, this is very inefficient (as written in the code), and could be called somewhere else
To Reproduce
- Open ProbabilityFunctions.cs
- go to line 74
Expected behavior
A precomputed table, or a once-and-for-all computed table
Metadata
Metadata
Assignees
Labels
untriagedNew issue has not been triagedNew issue has not been triaged