Open GoogleCodeExporter opened 9 years ago
Hi Anders,
You are right about the sorting order. I believe this would be particularly
noticeable if you run the tests on different versions of the .NET runtime, such
as 4 and 4.5. I think it would be best to write better tests, as it is not
strictly needed to impose any particular order for the tree. Thanks!
Regards,
Cesar
Original comment by cesarso...@gmail.com
on 30 Dec 2013 at 6:22
Many thanks Cesar, glad I wasn't too far off in my thinking :-)
This is just a hunch, but I am also experiencing issues with the unit test
"GaussianMixtureModelConstructorTest" in the "GaussianMixtureModelTest" class.
In the test assertions within the "for" loop, I get an error for sample 0 where
"gmm.Gaussians.Nearest" computes to 1 where 0 is expected,
https://github.com/accord-net/framework/blob/development/Sources/Accord.Tests/Ac
cord.Tests.MachineLearning/Clustering/GaussianMixtureModelTest.cs#L94 .
I get the error when I am using a stable sorting algorithm (in my PCL
libraries) instead of "Array.Sort". This difference is currently the only clue
I have to explain the test failure. Can you tell whether I am correct in my
guess, or if I need to dig further to find the true error cause?
Thanks in advance,
Anders
Original comment by cureos...@gmail.com
on 30 Dec 2013 at 10:18
Hi Anders,
This is exactly what I am fixing right now! In a few minutes I will push unit
test changes to the github repository. Thanks!
Regards,
Cesar
Original comment by cesarso...@gmail.com
on 30 Dec 2013 at 10:29
Hi Anders,
I updated some of the unit tests last week, please let me know if it helps.
There are still some tests which need to be fixed, though!
Regards,
Cesar
Original comment by cesarso...@gmail.com
on 3 Jan 2014 at 12:05
Hi Cesar,
yes, I found the updates that you pushed the other day, and I have merged
everything into the PCL repository. The updates worked practically out of the
box for me, which of course is very satisfying.
One difference between the .NET and the PCL source code is that I have to
provide some of the array sorting methods through a different static class,
since not all *Array.Sort* overloads are included in PCL. But the modifications
I need to make are still minimal. I have included a class *Arrays* in the
portable Core project, which contains sorting methods with the same signatures
as the *System.Array* class.
The previously failing unit test in *GaussianMixtureModelTest* now succeeds.
However, as far as I can tell the unit tests in *KDTreeTest* have not been
updated? I still get test failures in these unit tests, but I am not overly
concerned about this thanks to your explanations above. When you have a chance
to update these tests, I intend to merge the updates and I am fairly confident
that the tests will then succeed :-)
Many thanks for all your work with this!
Best regards,
Anders
Original comment by cureos...@gmail.com
on 3 Jan 2014 at 1:39
Original issue reported on code.google.com by
cureos...@gmail.com
on 30 Dec 2013 at 9:37