Problemss getting started

158 views
Skip to first unread message

sebastian amsuess

unread,
Jul 24, 2013, 2:55:37 PM7/24/13
to accor...@googlegroups.com
Hello, 

first I have to say I am truley impressed by the quantity of algorimths implemented in Accord, and even more how well they are introduced in Cesars blog. Simply great. And the best part is the accompanying  source code. With code everything is so much clearer! Also the code is really well written, and thus a great source for someone like me as an intermediate C# programmer. Learning from other peoples code is the best way to improve your own coding!

So, eager to learn, I followed the download and installation guides (not much to do wrong there I guess) and tried to make a dummy project to see if referencing the libraries etc. worked. Turns out it didn't :(
I added all references successfully and also "using" statements were no problem.
Here is part of the "dummy" code I was talking about:

private void button1_Click(object sender, EventArgs e)
{
            KernelSupportVectorMachine ksvm = new KernelSupportVectorMachine(new Accord.Statistics.Kernels.Gaussian(), 3);

            AForge.Neuro.ActivationNetwork ann = new AForge.Neuro.ActivationNetwork(new AForge.Neuro.BipolarSigmoidFunction(), 4, new int[2]);
            //LevenbergMarquardtLearning teacher = new LevenbergMarquardtLearning(ann, false);
            //teacher.RunEpoch(new double[3][], new double [3][]);
}

As you will have guessed I have a trivial Windows.Forms app with one button. When I press it I would like to step into this code, which works fine. The SVM and the ANN are generated. No problems. But when I uncomment the first commented line (LM-teacher), I can still compile and start the app, but as soon as I click my button, an exception occurs: 
Could not load file or assembly 'AForge.Neuro, Version=2.2.4.0, Culture=neutral, PublicKeyToken=2094f4ea39731d4f' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I am on a Win7 64bit PC, VS2010 Professional, target platform Any CPU, target framework .NET 4 Client Profile. I downloaded and installed Accord 2.9.0 and AForge 2.2.5 versions. 

Can you tell me where I went wrong and how I can prevent this from happening when I will try out other libraries & components?
Thank you very much!
Sebastian

César

unread,
Jul 24, 2013, 7:36:39 PM7/24/13
to accor...@googlegroups.com
Hi Sebastian!

I am glad you are finding the framework useful; apologies since it didn't work right out of the box for you. Perhaps it could be possible AForge.Neuro has a bit more dependencies on other .dlls which have not been referenced in your project. In particular, please take a look if you are also referencing AForge's AForge.dll (AForge.Core), AForge.Math.dll, AForge.Neuro.dll, and the Accord's Accord.Core, Accord.Math and Accord.Neuro. 

By the way, AForge version 2.2.5 had been released just a few days ago and I haven't tested it yet to see if everything still works. I would suggest if you could install AForge.NET 2.2.4 for the time being, at least until I can produce a new release keeping up with the latest AForge.

Hope it helps!

Best regards,
Cesar

sebastian amsuess

unread,
Jul 25, 2013, 3:08:39 AM7/25/13
to accor...@googlegroups.com
Hi Cesar,

I "downgraded" to AForge.NET 2.2.4 and checked all the included libraries you recommended - and it workes! I was convinced its a x86 - x64 compatibility issue. Guess I was wrong...
Well, thank you a lot for the helpful reply!

BTW, I have C# implementations of Non Negative Matrix factorization (NMF), a probabilistic latent variable model (PLVM) and LDA and QDA classifiers. If everything goes well I will soon update them to integrate Accord.NET and AForge.NET (e.g. for mean and covariance matrix calculations etc), which I now do manually. In case you are interested let me know and we can keep in touch about that =)
Cheers and thanks again!
Sebastian

César

unread,
Jul 27, 2013, 4:13:14 PM7/27/13
to accor...@googlegroups.com
Hi Sebastian!

I am glad it could work for you!

And yes, I would definitely love to hear about your implementations. The framework is currently accepting many user submissions, and yours would surely be welcome. Perhaps you would like to know the framework also has an implementation for NMF available, but since there are many ways to compute this factorization, we can always try to compare and see which works better or offer different computation methods (also, feel free to compare results and see if you find any issues!). The other methods you mentioned would also be very interesting as well. 

Also, if you mean LDA as in Linear Disciminant Analysis, there is also support for one version of it in the framework as well. Now if you mean Latent Dirichlet Allocation, this is something I really wanted to add someday!

Best regards,
Cesar

sebastian amsuess

unread,
Jul 29, 2013, 3:10:02 AM7/29/13
to accor...@googlegroups.com
Hello!

Well, I should have guessed that you already have NMF included =) I have the simplest version, the Lee-Seeung multiplicative update rule. I will compare the results and let you know if I find any issues. 

By LDA I meant Linear Discriminant Analysis. I have seen that you have this method implemented as a dimensionality reduction, but not as a classifier (if I am not mistaken).
Sorry, with Latent Dirichlet Allocation I cannot help you out at the moment...

Cheers!
Sebastian

Amit Desai

unread,
Jun 21, 2016, 7:43:30 AM6/21/16
to Accord.NET Framework
Hi Sebastian,

Does the latest version of Accord.Net libraries include QDA implementation? The documentation do not mention it anywhere. If you have the implementation can you please post it here?

Reply all
Reply to author
Forward
0 new messages