Skip to content

Commit

Permalink
cleaned up GP interfaces and added an own file for them
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 25, 2013
1 parent cf32c71 commit 5f56476
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 66 deletions.
15 changes: 1 addition & 14 deletions src/interfaces/modular/Classifier.i
Expand Up @@ -5,6 +5,7 @@
* (at your option) any later version.
*
* Written (W) 2009 Soeren Sonnenburg
* Written (W) 2013 Heiko Strathmann
* Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society
*/

Expand Down Expand Up @@ -64,12 +65,6 @@
%rename(DirectorLinearMachine) CDirectorLinearMachine;
%rename(DirectorKernelMachine) CDirectorKernelMachine;

#ifdef HAVE_EIGEN3
%rename(ProbitLikelihood) CProbitLikelihood;
%rename(LogitLikelihood) CLogitLikelihood;
%rename(GaussianProcessBinaryClassification) CGaussianProcessBinaryClassification;
#endif //HAVE_EIGEN3

/* These functions return new Objects */
%newobject apply();
%newobject apply(CFeatures* data);
Expand Down Expand Up @@ -112,14 +107,6 @@
%include <shogun/machine/DirectorLinearMachine.h>
%include <shogun/machine/DirectorKernelMachine.h>

#ifdef HAVE_EIGEN3
%include <shogun/machine/GaussianProcessMachine.h>
%include <shogun/machine/gp/LikelihoodModel.h>
%include <shogun/machine/gp/ProbitLikelihood.h>
%include <shogun/machine/gp/LogitLikelihood.h>
%include <shogun/classifier/GaussianProcessBinaryClassification.h>
#endif //HAVE_EIGEN3

#ifdef USE_SVMLIGHT

%ignore VERSION;
Expand Down
12 changes: 1 addition & 11 deletions src/interfaces/modular/Classifier_includes.i
Expand Up @@ -29,17 +29,7 @@
#include <shogun/classifier/mkl/MKLOneClass.h>
#include <shogun/classifier/vw/VowpalWabbit.h>
#include <shogun/classifier/svm/NewtonSVM.h>
#ifdef HAVE_EIGEN3
#include <shogun/machine/GaussianProcessMachine.h>
#include <shogun/machine/gp/LikelihoodModel.h>
#include <shogun/machine/gp/MeanFunction.h>
#include <shogun/machine/gp/ZeroMean.h>
#include <shogun/machine/gp/InferenceMethod.h>
#include <shogun/machine/gp/LaplacianInferenceMethod.h>
#include <shogun/machine/gp/ProbitLikelihood.h>
#include <shogun/machine/gp/LogitLikelihood.h>
#include <shogun/classifier/GaussianProcessBinaryClassification.h>
#endif //HAVE_EIGEN3

#ifdef USE_SVMLIGHT
#include <shogun/classifier/svm/SVMLight.h>
#include <shogun/classifier/svm/SVMLightOneClass.h>
Expand Down
13 changes: 13 additions & 0 deletions src/interfaces/modular/Machine.i
@@ -1,3 +1,13 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2009 Soeren Sonnenburg
* Written (W) 2013 Heiko Strathmann
*/

/*%warnfilter(302) apply;
%warnfilter(302) apply_generic;*/
#if defined(SWIGPYTHON) || defined(SWIGOCTAVE) || defined(SWIGRUBY) || defined(SWIGLUA) || defined(SWIGR)
Expand Down Expand Up @@ -63,6 +73,9 @@ APPLY_BINARY(CLinearMachine);
APPLY_BINARY(CKernelMachine);
APPLY_BINARY(CWDSVMOcas);
APPLY_BINARY(CPluginEstimate);
#ifdef HAVE_EIGEN3
APPLY_BINARY(CGaussianProcessBinaryClassification);
#endif //HAVE_EIGEN3

APPLY_REGRESSION(CKernelRidgeRegression);
APPLY_REGRESSION(CLibSVR);
Expand Down
28 changes: 2 additions & 26 deletions src/interfaces/modular/Regression.i
Expand Up @@ -5,6 +5,7 @@
* (at your option) any later version.
*
* Written (W) 2009 Soeren Sonnenburg
* Written (W) 2013 Heiko Strathmann
* Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society
*/

Expand All @@ -13,40 +14,16 @@
%rename(KernelRidgeRegression) CKernelRidgeRegression;
%rename(LinearRidgeRegression) CLinearRidgeRegression;
%rename(LeastSquaresRegression) CLeastSquaresRegression;
%rename(ExactInferenceMethod) CExactInferenceMethod;
%rename(LaplacianInferenceMethod) CLaplacianInferenceMethod;
%rename(FITCInferenceMethod) CFITCInferenceMethod;
%rename(GaussianLikelihood) CGaussianLikelihood;
%rename(StudentsTLikelihood) CStudentsTLikelihood;
%rename(ZeroMean) CZeroMean;
%rename(GaussianProcessRegression) CGaussianProcessRegression;
%rename(GaussianProcessBinaryClassification) CGaussianProcessBinaryClassification;
%rename(ProbitLikelihood) CProbitLikelihood;
%rename(LeastAngleRegression) CLeastAngleRegression;
%rename(LibSVR) CLibSVR;
%rename(LibLinearRegression) CLibLinearRegression;
%rename(MKL) CMKL;
%rename(MKLRegression) CMKLRegression;

#ifdef USE_SVMLIGHT
%rename(SVRLight) CSVRLight;
#endif //USE_SVMLIGHT

#ifdef HAVE_EIGEN3
%include <shogun/machine/gp/LikelihoodModel.h>
%include <shogun/machine/gp/GaussianLikelihood.h>
%include <shogun/machine/gp/StudentsTLikelihood.h>
%include <shogun/machine/gp/MeanFunction.h>
%include <shogun/machine/gp/ZeroMean.h>
%include <shogun/machine/gp/InferenceMethod.h>
%include <shogun/machine/gp/ExactInferenceMethod.h>
%include <shogun/machine/gp/LaplacianInferenceMethod.h>
%include <shogun/machine/gp/FITCInferenceMethod.h>
%include <shogun/machine/GaussianProcessMachine.h>
%include <shogun/regression/GaussianProcessRegression.h>
%include <shogun/classifier/GaussianProcessBinaryClassification.h>
%include <shogun/machine/gp/ProbitLikelihood.h>

#endif //HAVE_EIGEN3

/* Include Class Headers to make them visible from within the target language */
%include <shogun/regression/Regression.h>
Expand All @@ -58,7 +35,6 @@
%include <shogun/regression/svr/LibLinearRegression.h>
%include <shogun/classifier/mkl/MKL.h>
%include <shogun/regression/svr/MKLRegression.h>

#ifdef USE_SVMLIGHT
%include <shogun/regression/svr/SVRLight.h>
#endif //USE_SVMLIGHT
15 changes: 0 additions & 15 deletions src/interfaces/modular/Regression_includes.i
Expand Up @@ -6,21 +6,6 @@
#include <shogun/regression/KernelRidgeRegression.h>
#include <shogun/regression/LinearRidgeRegression.h>
#include <shogun/regression/LeastSquaresRegression.h>
#ifdef HAVE_EIGEN3
#include <shogun/machine/GaussianProcessMachine.h>
#include <shogun/machine/gp/LikelihoodModel.h>
#include <shogun/machine/gp/GaussianLikelihood.h>
#include <shogun/machine/gp/StudentsTLikelihood.h>
#include <shogun/machine/gp/MeanFunction.h>
#include <shogun/machine/gp/ZeroMean.h>
#include <shogun/machine/gp/InferenceMethod.h>
#include <shogun/machine/gp/ExactInferenceMethod.h>
#include <shogun/machine/gp/LaplacianInferenceMethod.h>
#include <shogun/machine/gp/FITCInferenceMethod.h>
#include <shogun/regression/GaussianProcessRegression.h>
#include <shogun/classifier/GaussianProcessBinaryClassification.h>
#include <shogun/machine/gp/ProbitLikelihood.h>
#endif //HAVE_EIGEN3
#include <shogun/regression/LeastAngleRegression.h>
#include <shogun/classifier/svm/SVM.h>
#include <shogun/classifier/svm/LibSVM.h>
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/modular/modshogun.i
Expand Up @@ -65,6 +65,7 @@
%include "Statistics_includes.i"
%include "Latent_includes.i"
%include "Metric_includes.i"
%include "GaussianProcess_includes.i"

%include "Machine.i"
%include "SGBase.i"
Expand All @@ -89,6 +90,7 @@
%include "Statistics.i"
%include "Latent.i"
%include "Metric.i"
%include "GaussianProcess.i"

#if defined(SWIGPERL)
%include "abstract_types_extension.i"
Expand Down

0 comments on commit 5f56476

Please sign in to comment.