@@ -794,40 +794,39 @@ BOOST_FIXTURE_TEST_CASE(testRuleActions, CTestFixture) {
794
794
0 , 0 , 100 ));
795
795
}
796
796
797
- TMockModelPtr initializeModel (ml::model::CResourceMonitor& resourceMonitor) {
798
- core_t ::TTime bucketLength{600 };
799
- model::SModelParams params{bucketLength};
800
- model::CSearchKey key;
801
- model_t ::TFeatureVec features;
802
- // Initialize mock model
803
- model::CAnomalyDetectorModel::TDataGathererPtr gatherer;
804
-
805
- features.assign (1 , model_t ::E_IndividualSumByBucketAndPerson);
806
-
807
- gatherer = std::make_shared<model::CDataGatherer>(
808
- model_t::analysisCategory (features[0 ]), model_t ::E_None, params, EMPTY_STRING,
809
- EMPTY_STRING, " p" , EMPTY_STRING, EMPTY_STRING, TStrVec{}, key, features, 0 , 0 );
810
-
811
- std::string person (" p1" );
812
- bool addedPerson{false };
813
- gatherer->addPerson (person, resourceMonitor, addedPerson);
814
-
815
- TMockModelPtr model{new model::CMockModel (
816
- params, gatherer, {/* we don't care about influence */ })};
817
-
818
- maths::time_series::CTimeSeriesDecomposition trend;
819
- maths::common::CNormalMeanPrecConjugate prior{
820
- maths::common::CNormalMeanPrecConjugate::nonInformativePrior (maths_t ::E_ContinuousData)};
821
- maths::common::CModelParams timeSeriesModelParams{
822
- bucketLength, 1.0 , 0.001 , 0.2 , 6 * core::constants::HOUR, 24 * core::constants::HOUR};
823
- std::unique_ptr<maths::time_series::CUnivariateTimeSeriesModel> timeSeriesModel =
824
- std::make_unique<maths::time_series::CUnivariateTimeSeriesModel>(
825
- timeSeriesModelParams, 0 , trend, prior);
826
- model::CMockModel::TMathsModelUPtrVec models;
827
- models.emplace_back (std::move (timeSeriesModel));
828
- model->mockTimeSeriesModels (std::move (models));
829
- return model;
830
- }
797
+ // TMockModelPtr initializeModel(ml::model::CResourceMonitor& resourceMonitor) {
798
+ // core_t::TTime bucketLength{600};
799
+ // model::SModelParams params{bucketLength};
800
+ // model::CSearchKey key;
801
+ // model_t::TFeatureVec features;
802
+ // // Initialize mock model
803
+ // model::CAnomalyDetectorModel::TDataGathererPtr gatherer;
804
+ //
805
+ // features.assign(1, model_t::E_IndividualSumByBucketAndPerson);
806
+ //
807
+ // gatherer = CDataGathererBuilder(model_t::analysisCategory(features[0]), features, params, key, 0)
808
+ // .personFieldName("p")
809
+ // .buildSharedPtr();
810
+ // std::string person("p1");
811
+ // bool addedPerson{false};
812
+ // gatherer->addPerson(person, resourceMonitor, addedPerson);
813
+ //
814
+ // TMockModelPtr model{new model::CMockModel(
815
+ // params, gatherer, {/* we don't care about influence */})};
816
+ //
817
+ // maths::time_series::CTimeSeriesDecomposition trend;
818
+ // maths::common::CNormalMeanPrecConjugate prior{
819
+ // maths::common::CNormalMeanPrecConjugate::nonInformativePrior(maths_t::E_ContinuousData)};
820
+ // maths::common::CModelParams timeSeriesModelParams{
821
+ // bucketLength, 1.0, 0.001, 0.2, 6 * core::constants::HOUR, 24 * core::constants::HOUR};
822
+ // std::unique_ptr<maths::time_series::CUnivariateTimeSeriesModel> timeSeriesModel =
823
+ // std::make_unique<maths::time_series::CUnivariateTimeSeriesModel>(
824
+ // timeSeriesModelParams, 0, trend, prior);
825
+ // model::CMockModel::TMathsModelUPtrVec models;
826
+ // models.emplace_back(std::move(timeSeriesModel));
827
+ // model->mockTimeSeriesModels(std::move(models));
828
+ // return model;
829
+ // }
831
830
832
831
BOOST_FIXTURE_TEST_CASE (testRuleTimeShiftShouldShiftTimeSeriesModelState, CTestFixture) {
833
832
0 commit comments