I was investigating different approaches for creating a support vector machine (SVM) prediction model using the C# language. There are a few hobbyist C# ports of the well-known libsvm library that are on github. A pretty good 32-bit port is at https://github.com/ccerhan/LibSVMsharp. The open source Accord.NET library ( http://accord-framework.net/ ) has SVM functionality too.
The bottom line is that I couldn’t determine a clear best approach. Using a hobbyist port of libsvm is good because it’s based on libsvm, the industry standard so to speak, but bad because of uncertain quality and support. Using Accord.NET is good because it has reasonable support but bad because the interface and code are not based on libsvm (as far as I can tell).
Here’s a screenshot of an SVM using the Accord.NET library. I set up eight training items. I used an SVM with a polynomial degree = 2 kernel. The weirdest part was the bizarre interface.
Almost all libraries would look something like this:
var svm = new SVM(C=1.0);
svm.Kernel = new Kernel('poly', degree=2, const=1.0);
svm.Train(data, algo='smo');
But the Accord.NET has a very unusual interface, along the lines of:
var smo = new SMO(); smo.Complexity = 1.0; smo.Kernel = new Polynomial(2, 0.0); var svm = smo.Learn(X, y);
In other words, you set up the SMO algorithm as the main object, train it, and a SVM model is returned. If you’re new to SVMs you might think, “Big deal. An interface is just an interface.” But this interface just feels wrong to me.
Another possibility for an SVM using C# is to code one up from scratch. I’ve done this before. The basic ideas of SVMs are simple but implementation is a real pain because there are zillions of tricky technical details and edge cases.

I worked at an amusement center when I was a teenager. Part of my job was to maintain and repair pinball machines. My two favorites were “Spanish Eyes” (Williams) and “Fireball” (Bally). Two completely different user interfaces. Years later I bought a “Monopoly” machine (Stern) for my game room. It’s in storage now but I can’t bring myself to sell it.

.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference
You must be logged in to post a comment.