ts-aggregator/project_template/Mape.cpp

30 lines
641 B
C++
Raw Normal View History

2022-12-13 12:36:06 +04:00
#include "StdAfx.h"
#include <iostream>
#include "Mape.h"
#include "Math.h"
#include <vector>
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Mape. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Estimation.
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
Mape::Mape() {
}
Mape::~Mape() {
}
double Mape::getValue(int paramCount, vector<double> original, vector<double> model) {
return 0;
}
double Mape::getValue(vector<double> original, vector<double> model) {
double mape = 0;
for (int i = 0; i < original.size(); i++) {
mape += fabs((fabs(original[i] - model[i])) / original[i]);
}
mape = mape / original.size();
mape = mape * 100;
return mape;
}