Changeset 1389 for applications/robust/main.cpp
- Timestamp:
- 09/13/11 19:44:06 (13 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
applications/robust/main.cpp
r1384 r1389 28 28 29 29 const int max_model_order = 2; 30 const double apriorno = 0.0 01;30 const double apriorno = 0.01; 31 31 32 32 /* … … 99 99 if(has_constant) 100 100 { 101 my_rarx = new RARX(ar_components.size()+1,window_size,true, apriorno*sqrt(2.0),apriorno*sqrt(2.0),ar_components.size()+4);101 my_rarx = new RARX(ar_components.size()+1,window_size,true,sqrt(2*apriorno),sqrt(2*apriorno),ar_components.size()+4); 102 102 my_arx = NULL; 103 103 } 104 104 else 105 105 { 106 my_rarx = new RARX(ar_components.size(),window_size,false, apriorno*sqrt(2.0),apriorno*sqrt(2.0),ar_components.size()+3);106 my_rarx = new RARX(ar_components.size(),window_size,false,sqrt(2*apriorno),sqrt(2*apriorno),ar_components.size()+3); 107 107 my_arx = NULL; 108 108 } … … 274 274 vector<vector<string>> strings; 275 275 276 char* file_string = "C:\\ Users\\Hontik\\Desktop\\Bayes\\dataADClosePercDiff"; // "C:\\Users\\Hontik\\Desktop\\Bayes\\ar_normal_single"; //276 char* file_string = "C:\\ar_student_single"; //"C:\\Users\\Hontik\\Desktop\\Bayes\\dataADClosePercDiff"; // 277 277 278 278 char dfstring[80]; … … 332 332 char fstring[80]; 333 333 strcpy(fstring,file_string); 334 strcat(fstring,"lognc.txt");335 //strcat(fstring,"preds.txt");334 //strcat(fstring,"lognc.txt"); 335 strcat(fstring,"preds.txt"); 336 336 337 337 for(int time = max_model_order;time<data_matrix.cols();time++) //time<data_matrix.cols() … … 356 356 } 357 357 358 pair<vec,vec> predictions = (*model_ref)->predict( 20,time,&LapRNG);358 pair<vec,vec> predictions = (*model_ref)->predict(500,time,&LapRNG); 359 359 360 360 cout << predictions.first << endl << predictions.second << endl; … … 364 364 (*model_ref)->predictions.ins((*model_ref)->predictions.size(),avg_prediction); 365 365 366 /*366 367 367 myfilew.open(fstring,ios::app); 368 368 myfilew << avg_prediction << ","; 369 369 myfilew.close(); 370 */370 371 371 372 372 //preds.ins(0,data_matrix.get(0,time+1)); 373 373 } 374 374 375 /*375 376 376 myfilew.open(fstring,ios::app); 377 377 myfilew << data_matrix.get(0,time+1) << endl; 378 378 myfilew.close(); 379 */379 380 380 381 381 result_lognc.ins_col(result_lognc.cols(),cur_res_lognc); … … 424 424 } 425 425 426 /* 426 427 for(int i = 0;i<cur_res_lognc.size();i++) 427 428 { 428 429 myfilew << cur_res_lognc[i] << ' ';//zmenil som ciarku ze medzeru 429 430 } 431 */ 430 432 431 433 myfilew << endl;