object
theta_forecasting
Standard Theta forecasting combining simple exponential smoothing and linear trend extrapolation.
logtalk_load(theta_forecasting(loader))static, context_switching_callsPublic predicates
fitted_values/2
Returns aligned SES training fits on the original scale using default options. Missing targets and the first known initialization anchor have independent unbound placeholders. These are not prefix-wise Theta forecasts.
staticfitted_values(Dataset,Values)fitted_values(+object_identifier,-list) - one_or_errorinstantiation_errortype_error(number,Observation)type_error(integer,DeclaredLength)domain_error(positive_integer,DeclaredLength)domain_error(non_empty_series,Dataset)domain_error(series_index_sequence,Dataset)consistency_error(series_length,DeclaredLength,ObservedLength)domain_error(series_length,Dataset)domain_error(insufficient_known_observations,Dataset)type_error(integer,Frequency)domain_error(positive_integer,Frequency)domain_error(series_length,Series)domain_error(insufficient_seasonal_phase_observations,Phase)domain_error(positive_number,Value)domain_error(residual_count,Residuals)evaluation_error(Error)fitted_values/3
Returns aligned SES training fits on the original scale using the learning options. Missing targets and the first known initialization anchor have independent unbound placeholders. Parameters and seasonal factors are fitted once using the full sample, not individual prefixes.
staticfitted_values(Dataset,Values,Options)fitted_values(+object_identifier,-list,+list(compound)) - one_or_errorinstantiation_errortype_error(list,Options)type_error(compound,Option)domain_error(option,Option)type_error(number,Observation)type_error(integer,DeclaredLength)domain_error(positive_integer,DeclaredLength)domain_error(non_empty_series,Dataset)domain_error(series_index_sequence,Dataset)consistency_error(series_length,DeclaredLength,ObservedLength)domain_error(series_length,Dataset)domain_error(insufficient_known_observations,Dataset)type_error(integer,Frequency)domain_error(positive_integer,Frequency)domain_error(seasonal_frequency,Frequency)domain_error(seasonal_frequency,Dataset)domain_error(theta_forecasting_option,Option)domain_error(series_length,Series)domain_error(insufficient_seasonal_phase_observations,Phase)domain_error(positive_number,Value)domain_error(residual_count,Residuals)evaluation_error(Error)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
prepare_learning/4
Collects and fits once, returning transient adjusted observations and residuals alongside the forecaster.
staticprepare_learning(Dataset,Forecaster,FitData,Options)prepare_learning(+object_identifier,-compound,-compound,+list(compound)) - one_or_errorinstantiation_errortype_error(list,Options)type_error(compound,Option)domain_error(option,Option)type_error(number,Observation)type_error(integer,DeclaredLength)domain_error(positive_integer,DeclaredLength)domain_error(non_empty_series,Dataset)domain_error(series_index_sequence,Dataset)consistency_error(series_length,DeclaredLength,ObservedLength)domain_error(series_length,Dataset)domain_error(insufficient_known_observations,Dataset)type_error(integer,Frequency)domain_error(positive_integer,Frequency)domain_error(seasonal_frequency,Frequency)domain_error(seasonal_frequency,Dataset)domain_error(theta_forecasting_option,Option)domain_error(series_length,Series)domain_error(insufficient_seasonal_phase_observations,Phase)domain_error(positive_number,Value)evaluation_error(Error)prepare_seasonality/8
Resolves the requested seasonal adjustment and dataset frequency.
staticprepare_seasonality(Dataset,Series,UserOptions,Options,Adjusted,Seasonality,Mode,Frequency)prepare_seasonality(+object_identifier,+list,+list,+list,-list,-term,-atom,-integer) - one_or_errorinstantiation_errortype_error(integer,Frequency)domain_error(positive_integer,Frequency)domain_error(seasonal_frequency,Dataset)domain_error(seasonal_frequency,Frequency)domain_error(theta_forecasting_option,Option)domain_error(series_length,Series)domain_error(insufficient_seasonal_phase_observations,Phase)domain_error(positive_number,Value)evaluation_error(Error)positive_series/1
Checks whether all known numeric observations are strictly positive, ignoring unbound observations.
staticpositive_series(Series)positive_series(+list) - zero_or_oneevaluation_error(Error)training_totals/6
Scores SES training fits after restoring the original seasonal scale and returns the same compact scoring errors.
statictraining_totals(Series,Adjusted,Seasonality,Errors,Totals,OriginalErrors)training_totals(+list,+list,+term,+compound,-compound,-list(number)) - one_or_errorevaluation_error(Error)score_seasonal/9
Scores known targets on their original scale, advancing phases but not residuals at gaps.
staticscore_seasonal(Actuals,Adjusted,Residuals,Method,Factors,Cycle,Totals0,Totals,OriginalErrors)score_seasonal(+list,+list,+list(number),+atom,+list(number),+list(number),+compound,-compound,-list(number)) - one_or_errorevaluation_error(Error)anchor_series/2
Removes only leading missing positions before fitting the SES initialization anchor.
staticanchor_series(Series,FitSeries)anchor_series(+list,-list) - onefit_level/13
Fits the SES level using the existing bounded optimization problem when needed.
staticfit_level(Series,RequestedAlpha,Initialization,OptimizerOptions,Alpha,InitialLevel,Level,SSE,Errors,Fitting,Convergence,Iterations,Evaluations)fit_level(+compound,+term,+atom,+list,-number,-number,-number,-number,-compound,-atom,-atom,-integer,-integer) - one_or_errordomain_error(option,Option)evaluation_error(Error)theta_correction/3
Computes the finite-sample correction, including the zero-alpha limit.
statictheta_correction(Length,Alpha,Correction)theta_correction(+positive_integer,+number,-number) - one_or_errorevaluation_error(Error)correction_steps/4
Evaluates the geometric correction through a stable recurrence.
staticcorrection_steps(Remaining,Weight,Previous,Correction)correction_steps(+non_negative_integer,+number,+number,-number) - one_or_errorevaluation_error(Error)residual_totals/3
Accumulates training residual error totals.
staticresidual_totals(Residuals,Totals0,Totals)residual_totals(+list(number),+compound,-compound) - one_or_errorevaluation_error(Error)valid_model/1
Validates ground state and mandatory diagnostics.
staticvalid_model(Forecaster)valid_model(+compound) - zero_or_oneevaluation_error(Error)valid_seasonality/4
Validates retained seasonal factors and next forecast phase.
staticvalid_seasonality(Seasonality,Length,Mode,Frequency)valid_seasonality(+term,+positive_integer,?atom,?positive_integer) - zero_or_oneevaluation_error(Error)valid_fitting/2
Validates fitting provenance and optimizer counters.
staticvalid_fitting(Initialization,Diagnostics)valid_fitting(+atom,+list(compound)) - zero_or_oneevaluation_error(Error)Operators
(none)