Changeset 1379 for applications/robust/main.cpp
- Timestamp:
- 07/15/11 20:26:08 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/robust/main.cpp
r1376 r1379 28 28 29 29 const int max_model_order = 2; 30 const double apriorno=0.0 2;30 const double apriorno=0.005; 31 31 32 32 /* … … 74 74 // problematic. 75 75 RARX* my_rarx; //vzmenovane parametre pre triedu model 76 ARX * my_arx;76 ARXwin* my_arx; 77 77 78 78 bool has_constant; … … 110 110 { 111 111 my_rarx = NULL; 112 my_arx = new ARX ();112 my_arx = new ARXwin(); 113 113 mat V0; 114 114 … … 117 117 V0 = apriorno * eye(ar_components.size()+2); //aj tu konst 118 118 V0(0,0) = 1; 119 my_arx->set_constant(true); 120 119 my_arx->set_constant(true); 121 120 } 122 121 else … … 129 128 } 130 129 131 my_arx->set_statistics(1, V0 );132 //my_arx->set_parameters(window_size);130 my_arx->set_statistics(1, V0, V0.rows()+1); 131 my_arx->set_parameters(window_size); 133 132 my_arx->validate(); 134 133 } … … 445 444 vector<vector<string>> strings; 446 445 447 char* file_string = "c:\\ar_ cauchy_single";446 char* file_string = "c:\\ar_normal_single"; // "c:\\dataTYClosePercDiff"; // 448 447 449 448 char dfstring[80]; … … 485 484 for(set<set<pair<int,int>>>::iterator model_type = model_types.begin();model_type!=model_types.end();model_type++) 486 485 {// prechadza rozne typy kanalov, a poctu regresorov 487 for(int window_size = 1 00;window_size < 101;window_size++)486 for(int window_size = 15;window_size < 16;window_size++) 488 487 { 489 488 models.push_back(new model((*model_type),true,true,window_size,0,&data_matrix)); // to su len konstruktory, len inicializujeme rozne typy … … 493 492 } 494 493 495 set<pair<int,int>> empty_list;496 models.push_back(new model(empty_list,false,true,100,0,&data_matrix));494 //set<pair<int,int>> empty_list; 495 //models.push_back(new model(empty_list,false,true,100,0,&data_matrix)); 497 496 } 498 497 … … 508 507 {//posuvam s apo models, co je pole modelov urobene o cyklus vyssie. Teda som v case time a robim to tam pre vsetky typy modelov, kombinace regresorov 509 508 (*model_ref)->data_update(time); //pozret sa preco je toto tu nutne 509 510 cout << "Updated." << endl; 510 511 //if (time = max_model_order) nazvy.push_back(models.model_ref]);// ako by som mohol dostat nazov modelu? 511 512