Permalink
Browse files

Transfer learning restructuring

  • Loading branch information...
1 parent f2489bd commit 801ce4d13a0901b1d492d283fa4b5cef26669c16 @lisitsyn lisitsyn committed Apr 13, 2012
@@ -52,8 +52,6 @@
%rename(VowpalWabbit) CVowpalWabbit;
#ifdef USE_SVMLIGHT
%rename(SVMLight) CSVMLight;
-%rename(DomainAdaptationSVM) CDomainAdaptationSVM;
-%rename(DomainAdaptationSVMLinear) CDomainAdaptationSVMLinear;
#endif //USE_SVMLIGHT
%rename(MulticlassStrategy) CMulticlassStrategy;
@@ -105,7 +103,6 @@
%include <shogun/classifier/mkl/MKLClassification.h>
%include <shogun/classifier/mkl/MKLOneClass.h>
%include <shogun/classifier/vw/VowpalWabbit.h>
-%include <shogun/classifier/svm/DomainAdaptationSVMLinear.h>
%include <shogun/classifier/svm/NewtonSVM.h>
%include <shogun/multiclass/MulticlassStrategy.h>
@@ -129,6 +126,5 @@
%include <shogun/classifier/svm/SVMLight.h>
%include <shogun/classifier/svm/SVMLightOneClass.h>
-%include <shogun/classifier/svm/DomainAdaptationSVM.h>
#endif //USE_SVMLIGHT
@@ -46,7 +46,5 @@
#ifdef USE_SVMLIGHT
#include <shogun/classifier/svm/SVMLight.h>
#include <shogun/classifier/svm/SVMLightOneClass.h>
- #include <shogun/classifier/svm/DomainAdaptationSVM.h>
#endif //USE_SVMLIGHT
- #include <shogun/classifier/svm/DomainAdaptationSVMLinear.h>
%}
@@ -0,0 +1,37 @@
+/*
+ * 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) 2012 Sergey Lisitsyn
+ * Copyright (C) 2012 Sergey Lisitsyn
+ */
+
+/* Multitask renames */
+%rename(MultitaskKernelNormalizer) CMultitaskKernelNormalizer;
+%rename(MultitaskKernelMklNormalizer) CMultitaskKernelMklNormalizer;
+%rename(MultitaskKernelTreeNormalizer) CMultitaskKernelTreeNormalizer;
+%rename(MultitaskKernelMaskNormalizer) CMultitaskKernelMaskNormalizer;
+%rename(MultitaskKernelMaskPairNormalizer) CMultitaskKernelMaskPairNormalizer;
+%rename(MultitaskKernelPlifNormalizer) CMultitaskKernelPlifNormalizer;
+
+/* Domain adaptation renames */
+#ifdef USE_SVMLIGHT
+%rename(DomainAdaptationSVM) CDomainAdaptationSVM;
+#endif //USE_SVMLIGHT
+%rename(DomainAdaptationSVMLinear) CDomainAdaptationSVMLinear;
+
+/* Multitask includes */
+%include <shogun/transfer/multitask/MultitaskKernelNormalizer.h>
+%include <shogun/transfer/multitask/MultitaskKernelNormalizer.h>
+%include <shogun/transfer/multitask/MultitaskKernelTreeNormalizer.h>
+%include <shogun/transfer/multitask/MultitaskKernelMaskNormalizer.h>
+%include <shogun/transfer/multitask/MultitaskKernelMaskPairNormalizer.h>
+%include <shogun/transfer/multitask/MultitaskKernelPlifNormalizer.h>
+
+/* Domain adaptation includes */
+#ifdef USE_SVMLIGHT
+%include <shogun/transfer/domain_adaptation/DomainAdaptationSVM.h>
+#endif // USE_SVMLIGHT
+%include <shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h>
@@ -0,0 +1,13 @@
+%{
+ #include <shogun/transfer/multitask/MultitaskKernelNormalizer.h>
+ #include <shogun/transfer/multitask/MultitaskKernelMklNormalizer.h>
+ #include <shogun/transfer/multitask/MultitaskKernelTreeNormalizer.h>
+ #include <shogun/transfer/multitask/MultitaskKernelMaskNormalizer.h>
+ #include <shogun/transfer/multitask/MultitaskKernelMaskPairNormalizer.h>
+ #include <shogun/transfer/multitask/MultitaskKernelPlifNormalizer.h>
+
+#ifdef USE_SVMLIGHT
+ #include <shogun/transfer/domain_adaptation/DomainAdaptationSVM.h>
+#endif /* USE_SVMLIGHT */
+ #include <shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h>
+%}
@@ -59,6 +59,7 @@
%include "Regression_includes.i"
%include "Structure_includes.i"
%include "Multiclass_includes.i"
+%include "Transfer_includes.i"
%include "SGBase.i"
%include "IO.i"
@@ -77,3 +78,4 @@
%include "ModelSelection.i"
%include "Structure.i"
%include "Multiclass.i"
+%include "Transfer.i"
@@ -15,7 +15,7 @@
#include <shogun/lib/common.h>
#include <shogun/lib/Trie.h>
#include <shogun/kernel/StringKernel.h>
-#include <shogun/multitask/MultitaskKernelMklNormalizer.h>
+#include <shogun/transfer/multitask/MultitaskKernelMklNormalizer.h>
#include <shogun/features/StringFeatures.h>
namespace shogun
@@ -12,7 +12,7 @@
#ifdef USE_SVMLIGHT
-#include <shogun/classifier/svm/DomainAdaptationSVM.h>
+#include <shogun/transfer/domain_adaptation/DomainAdaptationSVM.h>
#include <shogun/io/SGIO.h>
#include <iostream>
#include <vector>
@@ -12,7 +12,7 @@
#ifdef HAVE_LAPACK
-#include <shogun/classifier/svm/DomainAdaptationSVMLinear.h>
+#include <shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h>
#include <shogun/io/SGIO.h>
#include <shogun/base/Parameter.h>
#include <iostream>
@@ -12,7 +12,7 @@
#define _MULTITASKKERNELMKLNORMALIZER_H___
#include <shogun/kernel/KernelNormalizer.h>
-#include <shogun/multitask/MultitaskKernelMklNormalizer.h>
+#include <shogun/transfer/multitask/MultitaskKernelMklNormalizer.h>
#include <shogun/kernel/Kernel.h>
#include <algorithm>
#include <string>
@@ -12,7 +12,7 @@
#define _MULTITASKKERNELPLIFNORMALIZER_H___
#include <shogun/kernel/KernelNormalizer.h>
-#include <shogun/multitask/MultitaskKernelMklNormalizer.h>
+#include <shogun/transfer/multitask/MultitaskKernelMklNormalizer.h>
#include <shogun/kernel/Kernel.h>
#include <algorithm>
@@ -12,12 +12,13 @@
#define _MULTITASKKERNELTREENORMALIZER_H___
#include <shogun/kernel/KernelNormalizer.h>
-#include <shogun/multitask/MultitaskKernelMklNormalizer.h>
+#include <shogun/transfer/multitask/MultitaskKernelMklNormalizer.h>
#include <shogun/kernel/Kernel.h>
#include <algorithm>
#include <map>
#include <set>
#include <deque>
+#include <vector>
namespace shogun
{

0 comments on commit 801ce4d

Please sign in to comment.