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

In this case a fixed smoothing constant Alpha is used in smoothing equations (no minimization is performed).

Pascal
procedure SingleExpSmooth(const Y: TVec; const S: TVec; const Alpha: 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. 
Alpha 
Defines initial estimate for Alpha, returns Alpha which minimizes MSE. 
MSE 
Returns MSE, evaluated for constant Alpha. 
InitMethod 
Defines how the initial values for S[0] are calculated. 

Load data, perform smoothing with Alpha = 0.33.

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