22 #include "MASoundAdvancedAnalyzer.hpp" 24 #include "core/MAContainerStatistics.hpp" 25 #include "MASoundAnalyzerPrivate.hpp" 27 #include <MCSampleStatistics.hpp> 36 MASoundAdvancedAnalyzer::~MASoundAdvancedAnalyzer()
43 MC::FloatList NewVector;
51 MC::FloatList Vector = MCGetTableColumn<MC::FloatList>(
SlidingWindow, i);
66 NewVector.push_back(Minimum);
68 NewVector.push_back(Maximum);
70 NewVector.push_back(Maximum-Minimum);
71 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-Range")
74 NewVector.push_back(Mean);
75 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-AritMean")
76 NewVector.push_back(SlidingWindow.back()[i]-Mean);
77 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-AritMeanDiff")
79 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-AbsSum")
81 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-LogSquareSum")
83 MA_ANALYZER_ADD_FEATURE_NAME_STR(
FeatureNames[i]+
"-Power")
90 MC_ERROR(
"Feature vector size and feature name count are different (%d != %d)",
float MCCalculateColumnStatInTable(const std::vector< std::vector< T > > &table, int column, MCSampleStatistic< T > &statistic)
Calculate a statistic over a column in a table.
Power statistic for signals.
int SlidingWindowLimit
Sliding window count.
#define MC_ERROR(...)
Error macro.
bool FeatureNamesReady
Whether the feature names are defined.
MASoundAdvancedAnalyzer(unsigned int frequency, unsigned int sliding_window_limit)
Class constructor.
MC::FloatTable FeatureVectors
Feature vectors.
Interquartile range statistic.
MC::StringList FeatureNames
Feature names.
MC::FloatTable SlidingWindow
Sliding window of feature vectors.
Logarithmic square sum statistic.
virtual MC::FloatList CalculateHorizontalFeatures() override
Calculate horizontal features for the feature vectors.
Arithmetic mean statistic.