You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
there seems to be a bug in Accord.Statistics.Analysis.ContrastFunctions.Kurtosis.cs
The Evaluate function reads
public void Evaluate(double[] x, double[] output, double[] derivative)
{
for (int j = 0; j < x.Length; j++)
{
// Kurtosis contrast function and its derivative, as given
// in original Hyvärinen's paper. See main references for the
// Independent Component Analysis class for details.
double v = x[j];
// g(w*x)
output[j] = v * v * v;
// g'(w*x)
derivative[j] = (1.0 / 3.0) * v * v;
}
}
However, the derivative should be:
derivative[j] = 3.0 * v * v;
This can be confirmed for example with the ComputeTest() unit test in Accord.Tests.Statistics.IndependentComponentAnalysisTest: Setting ica.Contrast = new Kurtosis(); before computing the ICA fails the test with the old derivative and succeeds with the new one.
Armin
The text was updated successfully, but these errors were encountered:
Hi,
there seems to be a bug in Accord.Statistics.Analysis.ContrastFunctions.Kurtosis.cs
The Evaluate function reads
However, the derivative should be:
This can be confirmed for example with the ComputeTest() unit test in Accord.Tests.Statistics.IndependentComponentAnalysisTest: Setting
ica.Contrast = new Kurtosis();
before computing the ICA fails the test with the old derivative and succeeds with the new one.Armin
The text was updated successfully, but these errors were encountered: