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) 2013 Kevin Hughes 00008 */ 00009 00010 #include <shogun/converter/ica/ICAConverter.h> 00011 00012 #ifdef HAVE_EIGEN3 00013 00014 using namespace shogun; 00015 00016 CICAConverter::CICAConverter() : CConverter() 00017 { 00018 init(); 00019 } 00020 00021 void CICAConverter::init() 00022 { 00023 m_mixing_matrix = SGMatrix<float64_t>(); 00024 max_iter = 200; 00025 tol = 1e-6; 00026 00027 SG_ADD(&m_mixing_matrix, "mixing_matrix", "the mixing matrix", MS_NOT_AVAILABLE); 00028 SG_ADD(&max_iter, "max_iter", "maximum number of iterations", MS_NOT_AVAILABLE); 00029 SG_ADD(&tol, "tol", "the convergence tolerance", MS_NOT_AVAILABLE); 00030 } 00031 00032 CICAConverter::~CICAConverter() 00033 { 00034 } 00035 00036 void CICAConverter::set_mixing_matrix(SGMatrix<float64_t> mixing_matrix) 00037 { 00038 m_mixing_matrix = mixing_matrix; 00039 } 00040 00041 SGMatrix<float64_t> CICAConverter::get_mixing_matrix() const 00042 { 00043 return m_mixing_matrix; 00044 } 00045 00046 void CICAConverter::set_max_iter(int iter) 00047 { 00048 max_iter = iter; 00049 } 00050 00051 int CICAConverter::get_max_iter() const 00052 { 00053 return max_iter; 00054 } 00055 00056 void CICAConverter::set_tol(float64_t _tol) 00057 { 00058 tol = _tol; 00059 } 00060 00061 float64_t CICAConverter::get_tol() const 00062 { 00063 return tol; 00064 } 00065 00066 #endif // HAVE_EIGEN3