I have been experiencing an Exception error
(surprisingly) while performing some parallel statistical tests with Math.Net Numerics
, and I'd like to know the rationale.
using MathNet.Numerics.Distributions;
....
var stable = new Stable(1.7, -0.7, 0.0087, 0.9103);
double b = stable.Density(3.2);
double a = stable.Density(5.1);
Console.WriteLine(b);
Console.WriteLine(a);
Error: An unhandled exception of type System.NotSupportedException
occured in MathNet.Numerics.dll
I was expecting to get b = 2.2484e-06
, a = 4.3977e-07
.
Ps: Other classical distributions such as Gamma
work without problem (e.g
Probability Distributions ), ruling out de facto any installation problem with the package
Best,
EDIT: From Github repository I've added Stable.cs in my project that includes all the properties and methods.
Factually, the properties are working fine. See below illustration from Program.cs:
Stable st = new Stable(1.7, -0.7, 0.0087, 0.9103); // correct instantiation
Console.WriteLine(string.Format(" Characteristic exponent: {0}\n
Skewness: {1}\n Scale: {2}\n Location: {3}" ,st.Alpha, st.Beta,
st.Scale,st.Location));
However there is nothing illogical, as far as I am concerned, in calling the Density
method based on the object
: st.Density(3.2)
which is supposed to return:
PDF(_alpha, _beta, _scale, _location, x);
Thus it's tempting to conclude a method definition
problem, unless people object this opinion with valid illustration.
Moreover, on special values of the stable parameters
(e.g _alpha = 2.0
, etc.)
the defined PDF
is returning 0
(weird)