Go to the documentation of this file.
22 #ifndef mia_core_ICAANALYSISBASE_HH
23 #define mia_core_ICAANALYSISBASE_HH
27 #include <boost/concept/requires.hpp>
28 #include <boost/concept_check.hpp>
50 typedef std::unique_ptr<CIndepCompAnalysis>
Pointer;
64 template <
class Iterator>
65 BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
67 set_row(
unsigned row, Iterator begin, Iterator end);
70 virtual
void initialize(
unsigned int series_length,
unsigned int slice_size) = 0;
77 virtual
bool run(
unsigned int nica,
std::vector<
std::vector<
float>> guess) = 0;
80 virtual
std::vector<
float> get_feature_row(
unsigned int row)const = 0;
83 virtual
std::vector<
float> get_mix_series(
unsigned int row)const = 0;
86 virtual
std::vector<
float> get_mix(
unsigned int idx)const = 0;
94 virtual
std::vector<
float> get_incomplete_mix(
unsigned int idx, const
IndexSet& skip)const = 0;
102 virtual
std::vector<
float> get_partial_mix(
unsigned int idx, const
IndexSet& use)const = 0;
116 virtual
void set_mixing_series(
unsigned int index, const
std::vector<
float>& series) = 0;
127 virtual
void normalize_ICs() = 0;
134 virtual
std::vector<
float> normalize_Mix() = 0;
138 virtual
unsigned int get_ncomponents() const = 0;
144 virtual
void set_max_iterations(
int n) = 0;
152 virtual
void set_deterministic_seed(
int seed) = 0;
154 virtual
void set_row_internal(
unsigned row, const
std::vector<
double>& buffer,
double mean) = 0;
175 virtual
CIndepCompAnalysis *do_create() const __attribute__((warn_unused_result)) = 0;
176 int m_deterministic_seed;
189 template<> const
char *const
208 template <
class Iterator>
209 BOOST_CONCEPT_REQUIRES(((::boost::ForwardIterator<Iterator>)),
213 const unsigned int length = std::distance(begin, end);
214 std::vector<double> buffer(length);
215 unsigned int idx = 0;
219 mean += (buffer[idx++] = *begin++);
223 for (
unsigned int i = 0; i < length; ++i)
226 set_row_internal(row, buffer, mean);
232 #endif // CICAANALYSISBASE_HH
std::vector< std::vector< float > > CSlopeColumns
class to store the ICA weight matrix
static const T & instance()
void set_row(unsigned row, Iterator begin, Iterator end)
the singleton that a plug-in handler really is
static const char * type_descr
CIndepCompAnalysisFactory()
virtual ~CIndepCompAnalysisFactory()
The basic template of all plugin handlers.
CIndepCompAnalysisFactory plugin_data
CIndepCompAnalysisFactory plugin_type
The base class for all plug-in created object.
PIndepCompAnalysisFactory produce_ica_factory(const std::string &descr)
CIndepCompAnalysis * create() const __attribute__((warn_unused_result))
the Base class for all plugn handlers that deal with factory plugins.
void set_deterministic_seed(int seed)
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
static const char * data_descr
CIndepCompAnalysis::Pointer PIndepCompAnalysis
std::unique_ptr< CIndepCompAnalysis > Pointer
std::shared_ptr< CIndepCompAnalysisFactory > PIndepCompAnalysisFactory
std::set< unsigned int > IndexSet
defines a set of indices used for mixing
class EXPORT_CORE CMeans private
virtual ~CIndepCompAnalysis()
This is tha base of all plugins that create "things", like filters, cost functions time step operator...