You are here: Symbol Reference > StatTimeSerAnalysis Namespace > Functions > StatTimeSerAnalysis.DoubleExpSmooth Function
Stats Master VCL
ContentsIndex
PreviousUpNext
StatTimeSerAnalysis.DoubleExpSmooth Function

In this case a fixed smoothing constants Alpha, Gamma are used in smoothing equations (no minimization is performed).

Pascal
procedure DoubleExpSmooth(const Y: TVec; const S: TVec; const B: TVec; const Alpha: double; const Gamma: double; out MSE: double; const InitMethod: Integer = 0); overload;
Parameters 
Description 
Time series data set. 
Smoothed values (see above equation). Size and complex properties of S are set automatically. 
Trend values (see above equation). Size and complex properties of b are set automatically. 
Alpha 
Defines initial estimate for Alpha, returns Alpha which minimizes MSE. 
Gamma 
Defines initial estimate for Gamma, returns Gamma which minimizes MSE. 
MSE 
Returns MSE, evaluated for constant Alpha and Gamma
InitMethod 
Defines how the initial values for b[0] are calculated. 

Load data, perform smoothing with Alpha = 0.2, Gamma = 0.18

Uses MtxExpr, StatTimeSerAnalysis, Math387;
procedure Example;
var Data,S,b: Vector;
    MSE: double;
begin
  Data.LoadFromFile('aerosol_particles.vec');
  // smooth data with Alpha=0.2, Gamma=0.18
  DoubleExpSmooth(Data,S,b,0.2,0.18,MSE,1);
  // results: MSE
end;
#include "MtxExpr.hpp"
#include "Math387.hpp"
#include "StatTimeSerAnalysis.hpp"
void __fastcall Example();
{
  sVector Data, S, b;
  double MSE;
  Data.LoadFromFile("aerosol_particles.vec");
  // smooth data with Alpha=0.2, Gamma=0.18
  DoubleExpSmooth(Data,S,b,0.2,0.18,MSE,1);
  // results: MSE
}
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!