Commit c2c2d613 authored by Alessio Netti's avatar Alessio Netti
Browse files

Analytics: fixing warnings

parent c6b85c66
......@@ -338,16 +338,16 @@ void CSOperator::computeMinMax(std::vector<std::vector<reading_t>>& v) {
// of each variable in the diagonal of the matrix
void CSOperator::convertToCorrelation(cv::Mat &m) {
// Computing Pearson correlations
for(size_t i=0; i<m.size().height; i++) {
for(size_t j=0; j<m.size().width; j++) {
for(size_t i=0; i<(size_t)m.size().height; i++) {
for(size_t j=0; j<(size_t)m.size().width; j++) {
if(i!=j)
m.at<double>(i,j) = m.at<double>(i,j) / (sqrt(m.at<double>(i,i))*sqrt(m.at<double>(j,j)) + 0.00001);
}
}
// Getting global correlations
for(size_t i=0; i<m.size().height; i++) {
for(size_t i=0; i<(size_t)m.size().height; i++) {
m.at<double>(i,i) = 0;
for(size_t j=0; j<m.size().width; j++) {
for(size_t j=0; j<(size_t)m.size().width; j++) {
if(i!=j) {
m.at<double>(i,i) += m.at<double>(i,j);
}
......
......@@ -105,7 +105,7 @@ protected:
unsigned long long _trainingSamples;
unsigned long long _numBlocks;
unsigned long long _scalingFactor;
unsigned long long _trainingReady;
long long _trainingReady;
bool _trainingPending;
bool _reuseModel;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment