Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old API from SWIG #4463

Open
karlnapf opened this issue Jan 13, 2019 · 12 comments
Open

Remove old API from SWIG #4463

karlnapf opened this issue Jan 13, 2019 · 12 comments

Comments

@karlnapf
Copy link
Member

No description provided.

@karlnapf karlnapf created this issue from a note in Release 7.0.0 (To do) Jan 13, 2019
@karlnapf
Copy link
Member Author

@avramidis

@karlnapf
Copy link
Member Author

#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

  • meta eamples
  • undocumented python examples
  • ipython notebooks

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

  • applications
  • graphical python examples

@karlnapf karlnapf moved this from To do to In progress in Release 7.0.0 Jan 13, 2019
@gf712
Copy link
Member

gf712 commented Jan 14, 2019

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
Copy link
Contributor

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

@gf712
Copy link
Member

gf712 commented Jan 14, 2019

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
Copy link
Member

vigsterkr commented Jan 14, 2019 via email

@gf712
Copy link
Member

gf712 commented Jan 14, 2019

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

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
};

@karlnapf
Copy link
Member Author

karlnapf commented Jan 14, 2019

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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member

gf712 commented Jan 14, 2019

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
Copy link
Member Author

karlnapf commented Jan 14, 2019 via email

@karlnapf karlnapf moved this from In progress to To do in Release 7.0.0 Jan 29, 2019
@vigsterkr vigsterkr moved this from To do to In progress in Release 7.0.0 Jan 29, 2019
@karlnapf karlnapf moved this from In progress to To do in Release 7.0.0 Jan 29, 2019
@vigsterkr vigsterkr moved this from To do to In progress in Release 7.0.0 Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Release 7.0.0
  
In progress
Development

No branches or pull requests

4 participants