dotnet / dotnet/machinelearning
erfInv is very inneficient
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
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**
1. Open ProbabilityFunctions.cs
2. go to line 74
**Expected behavior**
A precomputed table, or a once-and-for-all computed table
Contributor guide
Assessment
This issue has not been assessed yet.