@@ -44,9 +44,11 @@ using TForecastPushDatapointFunc = std::function<void(SErrorBar)>;
4444class MATHS_EXPORT CModelParams {
4545public:
4646 CModelParams (core_t ::TTime bucketLength,
47- const double & learnRate,
48- const double & decayRate,
49- double minimumSeasonalVarianceScale);
47+ double learnRate,
48+ double decayRate,
49+ double minimumSeasonalVarianceScale,
50+ core_t ::TTime minimumTimeToDetectChange,
51+ core_t ::TTime maximumTimeToTestForChange);
5052
5153 // ! Get the bucket length.
5254 core_t ::TTime bucketLength () const ;
@@ -63,6 +65,15 @@ class MATHS_EXPORT CModelParams {
6365 // ! Get the minimum seasonal variance scale.
6466 double minimumSeasonalVarianceScale () const ;
6567
68+ // ! Check if we should start testing for a change point in the model.
69+ bool testForChange (core_t ::TTime changeInterval) const ;
70+
71+ // ! Get the minimum time to detect a change point in the model.
72+ core_t ::TTime minimumTimeToDetectChange (void ) const ;
73+
74+ // ! Get the maximum time to test for a change point in the model.
75+ core_t ::TTime maximumTimeToTestForChange (void ) const ;
76+
6677 // ! Set the probability that the bucket will be empty for the model.
6778 void probabilityBucketEmpty (double probability);
6879
@@ -78,6 +89,10 @@ class MATHS_EXPORT CModelParams {
7889 double m_DecayRate;
7990 // ! The minimum seasonal variance scale.
8091 double m_MinimumSeasonalVarianceScale;
92+ // ! The minimum time permitted to detect a change in the model.
93+ core_t ::TTime m_MinimumTimeToDetectChange;
94+ // ! The maximum time permitted to test for a change in the model.
95+ core_t ::TTime m_MaximumTimeToTestForChange;
8196 // ! The probability that a bucket will be empty for the model.
8297 double m_ProbabilityBucketEmpty;
8398};
@@ -90,8 +105,6 @@ class MATHS_EXPORT CModelAddSamplesParams {
90105
91106public:
92107 CModelAddSamplesParams ();
93- CModelAddSamplesParams (const CModelAddSamplesParams&) = delete ;
94- const CModelAddSamplesParams& operator =(const CModelAddSamplesParams&) = delete ;
95108
96109 // ! Set whether or not the data are integer valued.
97110 CModelAddSamplesParams& integer (bool integer);
@@ -145,8 +158,6 @@ class MATHS_EXPORT CModelProbabilityParams {
145158
146159public:
147160 CModelProbabilityParams ();
148- CModelProbabilityParams (const CModelAddSamplesParams&) = delete ;
149- const CModelProbabilityParams& operator =(const CModelAddSamplesParams&) = delete ;
150161
151162 // ! Set the tag for the entity for which to compute the probability.
152163 CModelProbabilityParams& tag (std::size_t tag);
@@ -254,6 +265,9 @@ class MATHS_EXPORT CModel {
254265 E_Reset // !< Model reset.
255266 };
256267
268+ // ! Combine the results \p lhs and \p rhs.
269+ static EUpdateResult combine (EUpdateResult lhs, EUpdateResult rhs);
270+
257271public:
258272 CModel (const CModelParams& params);
259273 virtual ~CModel () = default ;
0 commit comments