35 lines
777 B
C++
35 lines
777 B
C++
//
|
|
// Ìåòîä ýêñïîíåíöèàëüíîãî ñãëàæèâàíèÿ è ïðîãíîçèðîâàíèÿ:
|
|
// àääèòèâíûé òðåíä, àääèòèâíàÿ ñåçîííîñòü
|
|
//
|
|
#include "StdAfx.h"
|
|
#include <iostream>
|
|
#include "Method.h"
|
|
|
|
void Method::partition() {
|
|
this->xLearning.clear();
|
|
this->xEstimation.clear();
|
|
this->xLearning.resize(x.size() - countPointForecast);
|
|
this->xEstimation.resize(this->countPointForecast);
|
|
//ñîõðàíÿåì ÷àñòü äëÿ òåñòèðîâàíèÿ
|
|
for (unsigned int i = 0; i < x.size() - countPointForecast; i++) {
|
|
this->xLearning[i] = x[i];
|
|
}
|
|
// ñîõðàíÿåì ÷àñòü ÂÐ äëÿ òåñòèðîâàíèÿ
|
|
int j=0;
|
|
for (unsigned int i = x.size() - countPointForecast; i < x.size(); i++) {
|
|
this->xEstimation[j++] = x[i];
|
|
}
|
|
}
|
|
|
|
vector<double> Method::getXEstimation() {
|
|
return this->xEstimation;
|
|
}
|
|
|
|
int Method::getNamberParam() {
|
|
return 1;
|
|
}
|
|
|
|
|
|
|