Skip to content

Commit

Permalink
new classes added to modular
Browse files Browse the repository at this point in the history
  • Loading branch information
gsomix committed Jun 10, 2012
1 parent 0df5d4d commit 1914e86
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/interfaces/modular/Classifier.i
Expand Up @@ -14,6 +14,16 @@
%feature("autodoc", "get_alphas(self) -> [] of float") get_alphas;
#endif

#ifdef USE_SWIG_DIRECTORS
%feature("director") shogun::CDirectorLinearMachine;
%feature("director") shogun::CDirectorKernelMachine;
%feature("director:except") {
if ($error != NULL) {
throw Swig::DirectorMethodException();
}
}
#endif

/* Remove C Prefix */
%rename(Machine) CMachine;
%rename(KernelMachine) CKernelMachine;
Expand Down Expand Up @@ -52,6 +62,8 @@
%rename(SVMLight) CSVMLight;
%rename(SVMLightOneClass) CSVMLightOneClass;
#endif //USE_SVMLIGHT
%rename(DirectorLinearMachine) CDirectorLinearMachine;
%rename(DirectorKernelMachine) CDirectorKernelMachine;

/* These functions return new Objects */
%newobject apply();
Expand Down Expand Up @@ -93,6 +105,8 @@
%include <shogun/classifier/mkl/MKLOneClass.h>
%include <shogun/classifier/vw/VowpalWabbit.h>
%include <shogun/classifier/svm/NewtonSVM.h>
%include <shogun/machine/DirectorLinearMachine.h>
%include <shogun/machine/DirectorKernelMachine.h>

#ifdef USE_SVMLIGHT

Expand Down
3 changes: 3 additions & 0 deletions src/interfaces/modular/Classifier_includes.i
Expand Up @@ -36,4 +36,7 @@
#include <shogun/classifier/svm/SVMLight.h>
#include <shogun/classifier/svm/SVMLightOneClass.h>
#endif //USE_SVMLIGHT

#include <shogun/machine/DirectorLinearMachine.h>
#include <shogun/machine/DirectorKernelMachine.h>
%}
4 changes: 3 additions & 1 deletion src/shogun/machine/Machine.h
Expand Up @@ -78,7 +78,9 @@ enum EMachineType
CT_NEWTONSVM = 440,
CT_GAUSSIANPROCESSREGRESSION = 450,
CT_LARS = 460,
CT_MULTICLASS = 470
CT_MULTICLASS = 470,
CT_DIRECTORLINEAR = 480,
CT_DIRECTORKERNEL = 490
};

/** solver type */
Expand Down

0 comments on commit 1914e86

Please sign in to comment.