SHOGUN
v3.2.0
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2011-2013 Sergey Lisitsyn 00008 * Copyright (C) 2011-2013 Berlin Institute of Technology and Max-Planck-Society 00009 */ 00010 00011 #ifndef MULTIDIMENSIONALSCALING_H_ 00012 #define MULTIDIMENSIONALSCALING_H_ 00013 #include <shogun/lib/config.h> 00014 #ifdef HAVE_EIGEN3 00015 #include <shogun/converter/EmbeddingConverter.h> 00016 #include <shogun/features/Features.h> 00017 #include <shogun/distance/Distance.h> 00018 00019 namespace shogun 00020 { 00021 00022 class CFeatures; 00023 class CDistance; 00024 00061 class CMultidimensionalScaling: public CEmbeddingConverter 00062 { 00063 public: 00064 00065 /* constructor */ 00066 CMultidimensionalScaling(); 00067 00068 /* destructor */ 00069 virtual ~CMultidimensionalScaling(); 00070 00075 virtual CDenseFeatures<float64_t>* embed_distance(CDistance* distance); 00076 00082 virtual CFeatures* apply(CFeatures* features); 00083 00085 const char* get_name() const; 00086 00090 SGVector<float64_t> get_eigenvalues() const; 00091 00097 void set_landmark_number(int32_t num); 00098 00102 int32_t get_landmark_number() const; 00103 00107 void set_landmark(bool landmark); 00108 00112 bool get_landmark() const; 00113 00115 protected: 00116 00118 virtual void init(); 00119 00121 protected: 00122 00124 SGVector<float64_t> m_eigenvalues; 00125 00127 bool m_landmark; 00128 00130 int32_t m_landmark_number; 00131 00132 }; 00133 00134 } 00135 #endif /* HAVE_EIGEN3 */ 00136 #endif /* MULTIDIMENSIONALSCALING_H_ */