shogun-toolbox / shogun

Shōgun
http://shogun-toolbox.org
BSD 3-Clause "New" or "Revised" License
3.02k stars 1.04k forks source link

Remove old API from SWIG #4463

Open karlnapf opened 5 years ago

karlnapf commented 5 years ago

@avramidis

karlnapf commented 5 years ago

4462 is an example that requires some more work as the gaussian kernel is used all over shogun's history, other classes (such as machines) should be much smaller diffs

The main thing to keep the build intact is

I have ignored for now (as not part of the build)

gf712 commented 5 years ago

I'll start working a bit on this. Btw what exactly are the undocumented python examples? I can start translating them to .sg files?

avramidis commented 5 years ago

Yes, the idea is to convert all undocumented python examples to .sg files.

gf712 commented 5 years ago

How do you handle the GPL only classes? Is there a way to hide .sg files from the compiler/test with GPL only implementations?

vigsterkr commented 5 years ago

Its in cmake...

On 14 Jan 2019, at 13:39, Gil notifications@github.com wrote:

How do you handle the GPL only classes? Is there a way to hide .sg files from the compiler/test with GPL only implementations?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

gf712 commented 5 years ago

Also need to come up with a way to get to the solvers when LibLinear.h is removed from Classifier.i https://github.com/shogun-toolbox/shogun/blob/f8a120b25ccd32bdefb47a2e9170f04647050fd8/src/shogun/classifier/svm/LibLinear.h#L21-L38

karlnapf commented 5 years ago

I'll start working a bit on this. Btw what exactly are the undocumented python examples? I can start translating them to .sg files?

examples/undocumented/python Either delete (if it doesnt show something useful, some example were tests), or translate (which might need some c++ adjustments here and there

karlnapf commented 5 years ago

How do you handle the GPL only classes? Is there a way to hide .sg files from the compiler/test with GPL only implementations?

Check cmake/FindMetaExamples.cmake, where you can blacklist things based on their dependencies

karlnapf commented 5 years ago

Also need to come up with a way to get to the solvers when LibLinear.h is removed from Classifier.i shogun/src/shogun/classifier/svm/LibLinear.h

Lines 21 to 38 in f8a120b

enum LIBLINEAR_SOLVER_TYPE { /// L2 regularized linear logistic regression L2R_LR, /// L2 regularized SVM with L2-loss using dual coordinate descent L2R_L2LOSS_SVC_DUAL, /// L2 regularized SVM with L2-loss using newton in the primal L2R_L2LOSS_SVC, /// L2 regularized linear SVM with L1-loss using dual coordinate descent // (default since this is the standard SVM) L2R_L1LOSS_SVC_DUAL, /// L1 regularized SVM with L2-loss using dual coordinate descent L1R_L2LOSS_SVC, /// L1 regularized logistic regression L1R_LR, /// L2 regularized linear logistic regression via dual L2R_LR_DUAL };

That is a good point .... will need to continue to expose those to swig with the current design (could change later). Might need to think about this ...

gf712 commented 5 years ago

Either delete (if it doesnt show something useful, some example were tests), or translate (which might need some c++ adjustments here and there

I find that a lot undocumented examples are just slight variations of one another.. for example the svms are very similar in terms of API. But they also are helpful for debugging...

karlnapf commented 5 years ago

That is true We still want to port them all (at least every class), keep in mind the examples also serve as integration tests (if you add re data file, see readme) so wenincrease coverage a lot (this has been helpful when refactoring classes that have no unit tests.

What you are saying is true though for the cookbooks: we don’t need one for every svm if they all have the same api. Just one well written that represents all does it here.

On Mon, 14 Jan 2019 at 17:36, Gil notifications@github.com wrote:

Either delete (if it doesnt show something useful, some example were tests), or translate (which might need some c++ adjustments here and there I find that a lot undocumented examples are just slight variations of one another.. for example the svms are very similar in terms of API

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/shogun-toolbox/shogun/issues/4463#issuecomment-454070707, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqqv1zJaGSQRcO2xpMlNATwxsuGyYiiks5vDLH5gaJpZM4Z9Hyv .

-- Sent from my phone