ffsvm icon indicating copy to clipboard operation
ffsvm copied to clipboard

Plans to Support more SVM types

Open sammysheep opened this issue 2 years ago • 3 comments

Are there any plans to support more SVM types like multi-class GMNP? The Shogun project seems quiet now (abandoned?) and has left behind a trove of BSD-3 licensed C++.

Love that you are using Portable SIMD, it's a really great project.

sammysheep avatar Mar 28 '23 14:03 sammysheep

Are there any plans to support more SVM types like multi-class GMNP?

I haven't checked in with libSVM in a while, but this project was / is meant to be a drop-in Rust replacement. I could see support for other SVM types being added, but that would have to be driven by somebody else as it's not on my roadmap right now.

ralfbiedert avatar Mar 28 '23 14:03 ralfbiedert

Hmmm, I would have to evaluate that for myself as well.

BUT supposing someone wanted to contribute to this project, what are the contribution guidelines to follow?

sammysheep avatar Mar 28 '23 14:03 sammysheep

Contributions are very welcome. A few thoughts, random order:

  • Most important to me is that existing libSVM compat remains and all tests continue to pass (except if latest libSVM were to change) that it remains zero-alloc during runtime
  • Having SIMD instructions would be nice, but it could be worthwhile checking if autovectorization has gotten so good that the entire explicit SIMD machinery could be removed. That would massively simplify the code, remove that dependency and make it instantly compatibly with Rust stable (1)
  • As this was my first Rust project from a few years ago there are some implementation details that that I'm not proud of, and that probably make contributions / changes harder than they should be. From top of my mind: 1) too many macros for implementation details and 2) the simd_aligned library with the VectorD types & co. If any of these get in the way I happily accept patches addressing them
  • From my side I happily review PRs and bounce ideas, but I don't have much time working on this right now

Love that you are using Portable SIMD, it's a really great project.

(1) In theory it's great, but portable SIMD in Rust has been unstable for 5 years or so, and I don't know how many more years it will stay in that state. If I rewrote FFSVM from scratch I'd probably check autovec as mentioned, and / or add a super-thin stable SIMD shim on stable. Being nightly only is a huge drawback for adoption.

ralfbiedert avatar Mar 28 '23 20:03 ralfbiedert