36 | | UINT uType, // Transaction type. |
37 | | UINT uFmt, // Clipboard data format. |
38 | | HCONV hconv, // Handle to the conversation. |
39 | | HSZ hsz1, // Handle to a string. |
40 | | HSZ hsz2, // Handle to a string. |
41 | | HDDEDATA hdata, // Handle to a global memory object. |
42 | | DWORD dwData1, // Transaction-specific data. |
43 | | DWORD dwData2) // Transaction-specific data. |
| 34 | UINT uType, // Transaction type. |
| 35 | UINT uFmt, // Clipboard data format. |
| 36 | HCONV hconv, // Handle to the conversation. |
| 37 | HSZ hsz1, // Handle to a string. |
| 38 | HSZ hsz2, // Handle to a string. |
| 39 | HDDEDATA hdata, // Handle to a global memory object. |
| 40 | DWORD dwData1, // Transaction-specific data. |
| 41 | DWORD dwData2) // Transaction-specific data. |
175 | | |
176 | | prior_lognc = my_arx->posterior().lognc(); |
177 | | } |
178 | | } |
179 | | |
180 | | void data_update(int time) |
181 | | { |
182 | | if(time > order) |
183 | | { |
184 | | vec data_vector; |
185 | | for(list<pair<int,int>>::iterator ar_iterator = ar_components.begin();ar_iterator!=ar_components.end();ar_iterator++) |
186 | | { |
187 | | data_vector.ins(data_vector.size(),(*data_matrix).get(ar_iterator->first,time-ar_iterator->second)); |
188 | | } |
189 | | |
190 | | // cout << "Update cond: " << data_vector << endl; |
191 | | |
192 | | double cur_lognc; |
193 | | if(my_rarx!=NULL) |
194 | | { |
195 | | data_vector.ins(0,(*data_matrix).get(predicted_channel,time)); |
196 | | my_rarx->bayes(data_vector); |
197 | | cur_lognc = my_rarx->posterior->log_nc; |
198 | | } |
199 | | else |
200 | | { |
201 | | vec pred_vec; |
202 | | pred_vec.ins(0,(*data_matrix).get(predicted_channel,time)); |
203 | | my_arx->bayes(pred_vec,data_vector); |
204 | | cur_lognc = my_arx->posterior().lognc(); |
205 | | } |
206 | | |
207 | | number_of_updates++; |
208 | | |
209 | | if(number_of_updates>window_size) |
210 | | { |
211 | | lognc_history.ins(lognc_history.size(),cur_lognc-prior_lognc); |
212 | | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | void data_update(int time) //vlozime cas a ono vlozi do data_vector podmineky(conditions) a predikce, ktore pouzije do bayes |
| 138 | { |
| 139 | vec data_vector; |
| 140 | for(set<pair<int,int>>::iterator ar_iterator = ar_components.begin();ar_iterator!=ar_components.end();ar_iterator++) |
| 141 | { //ar?iterator ide len od 1 pod 2, alebo niekedy len 1 |
| 142 | data_vector.ins(data_vector.size(),(*data_matrix).get(ar_iterator->first,time-ar_iterator->second)); |
| 143 | // do data vector vlozi pre dany typ regresoru prislusne cisla z data_matrix. Ale ako? preco time-ar_iterator->second? |
| 144 | } |
| 145 | if(my_rarx!=NULL) |
| 146 | { //pre robusr priradi az tu do data_vector aj rpedikciu |
| 147 | data_vector.ins(0,(*data_matrix).get(predicted_channel,time)); |
| 148 | my_rarx->bayes(data_vector); |
216 | | lognc_history.ins(lognc_history.size(),0); |
217 | | } |
218 | | } |
219 | | |
220 | | pair<vec,vec> predict(int sample_size, int time, itpp::Laplace_RNG* LapRNG) |
221 | | { |
222 | | if(time > order) |
223 | | { |
224 | | vec condition_vector; |
225 | | for(list<pair<int,int>>::iterator ar_iterator = ar_components.begin();ar_iterator!=ar_components.end();ar_iterator++) |
226 | | { |
227 | | condition_vector.ins(condition_vector.size(),(*data_matrix).get(ar_iterator->first,time-ar_iterator->second+1)); |
228 | | } |
229 | | |
230 | | // cout << "Prediction cond: " << condition_vector << endl; |
231 | | |
232 | | if(my_rarx!=NULL) |
233 | | { |
234 | | pair<vec,mat> imp_samples = my_rarx->posterior->importance_sample(sample_size); |
235 | | |
236 | | //cout << "Point estimate: " << (imp_samples.second*imp_samples.first)/(imp_samples.first*ones(imp_samples.first.size())) << endl; |
237 | | |
238 | | vec sample_prediction; |
239 | | for(int t = 0;t<sample_size;t++) |
| 152 | vec pred_vec;//tu sa predikcia zadava zvlast |
| 153 | pred_vec.ins(0,(*data_matrix).get(predicted_channel,time)); |
| 154 | my_arx->bayes(pred_vec,data_vector); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | pair<vec,vec> predict(int sample_size, int time, itpp::Laplace_RNG* LapRNG) //nerozumiem, ale vraj to netreba, nepouziva to |
| 159 | { |
| 160 | vec condition_vector; |
| 161 | for(set<pair<int,int>>::iterator ar_iterator = ar_components.begin();ar_iterator!=ar_components.end();ar_iterator++) |
| 162 | { |
| 163 | condition_vector.ins(condition_vector.size(),(*data_matrix).get(ar_iterator->first,time-ar_iterator->second+1)); |
| 164 | } |
| 165 | |
| 166 | if(my_rarx!=NULL) |
| 167 | { |
| 168 | pair<vec,mat> imp_samples = my_rarx->posterior->importance_sample(sample_size); |
| 169 | |
| 170 | //cout << imp_samples.first << endl; |
| 171 | |
| 172 | vec sample_prediction; |
| 173 | for(int t = 0;t<sample_size;t++) |
| 174 | { |
| 175 | vec lap_sample = condition_vector; |
| 176 | |
| 177 | if(has_constant) |
277 | | |
278 | | return pair<vec,vec>(ones(sample_prediction.size()),sample_prediction); |
279 | | } |
| 202 | |
| 203 | gau_sample.ins(0,randn()); |
| 204 | |
| 205 | sample_prediction.ins(0,gau_sample*samples.get_col(t)); |
| 206 | } |
| 207 | |
| 208 | return pair<vec,vec>(ones(sample_prediction.size()),sample_prediction); |
| 209 | } |
| 210 | |
| 211 | } |
| 212 | |
| 213 | |
| 214 | static set<set<pair<int,int>>> possible_models_recurse(int max_order,int number_of_channels) |
| 215 | { |
| 216 | set<set<pair<int,int>>> created_model_types; |
| 217 | |
| 218 | if(max_order == 1)//ukoncovacia vetva |
| 219 | { |
| 220 | for(int channel = 0;channel<number_of_channels;channel++)//pre AR 1 model vytvori kombinace kanalov v prvom kroku poyadu |
| 221 | { |
| 222 | set<pair<int,int>> returned_type; |
| 223 | returned_type.insert(pair<int,int>(channel,1)); //?? |
| 224 | created_model_types.insert(returned_type); |
| 225 | } |
| 226 | |
| 227 | return created_model_types; |
284 | | return pair<vec,vec>(zeros(1),ones(1)); |
285 | | } |
286 | | |
287 | | } |
288 | | |
289 | | |
290 | | static list<list<pair<int,int>>> possible_models_recurse(int max_order,int number_of_channels) |
291 | | { |
292 | | list<list<pair<int,int>>> created_model_types; |
293 | | |
294 | | if(max_order == 1) |
295 | | { |
296 | | for(int channel = 0;channel<number_of_channels;channel++) |
297 | | { |
298 | | list<pair<int,int>> returned_type; |
299 | | returned_type.push_back(pair<int,int>(channel,1)); |
300 | | created_model_types.push_back(returned_type); |
301 | | } |
302 | | |
303 | | return created_model_types; |
304 | | } |
305 | | else |
306 | | { |
307 | | created_model_types = possible_models_recurse(max_order-1,number_of_channels); |
308 | | list<list<pair<int,int>>> returned_types; |
309 | | |
310 | | for(list<list<pair<int,int>>>::iterator model_ref = created_model_types.begin();model_ref!=created_model_types.end();model_ref++) |
| 234 | for(set<set<pair<int,int>>>::iterator model_ref = created_model_types.begin();model_ref!=created_model_types.end();model_ref++) |
347 | | |
348 | | char szApp[] = "MT4"; |
349 | | char szTopic[] = "BID"; |
350 | | char szItem[] = "EURUSD"; |
351 | | char* itRef = &szItem[0]; |
352 | | |
353 | | char* file_string = "c:\\rtdata"; |
354 | | |
355 | | ofstream myfile; |
356 | | char fstring[80]; |
357 | | strcpy(fstring,file_string); |
358 | | strcat(fstring,itRef); |
359 | | strcat(fstring,"lognc.txt"); |
360 | | |
361 | | list<list<pair<int,int>>> model_types = model::possible_models_recurse(max_model_order,1); |
362 | | |
363 | | int max_window = 50; |
364 | | int min_window = 1; |
365 | | |
366 | | list<model*> models; |
367 | | for(list<list<pair<int,int>>>::iterator model_type = model_types.begin();model_type!=model_types.end();model_type++) |
368 | | { |
369 | | for(int window_size = min_window;window_size < max_window;window_size++) |
370 | | { |
371 | | //models.push_back(new model((*model_type),true,true,window_size,0,&data_matrix)); |
372 | | models.push_back(new model((*model_type),false,true,window_size,0,&data_matrix)); |
373 | | //models.push_back(new model((*model_type),true,false,window_size,0,&data_matrix)); |
374 | | //models.push_back(new model((*model_type),false,false,window_size,0,&data_matrix)); |
375 | | } |
376 | | } |
377 | | |
378 | | mat result_lognc; |
379 | | mat result_preds; |
380 | | |
381 | | /* |
430 | | while(avg_vec.size() < data_count) |
431 | | { |
432 | | MSG msg; |
433 | | BOOL MsgReturn = GetMessage ( &msg , NULL , 0 , 0 ); |
434 | | |
435 | | if(MsgReturn) |
436 | | { |
437 | | TranslateMessage(&msg); |
438 | | DispatchMessage(&msg); |
439 | | } |
440 | | Sleep(500); |
441 | | } |
442 | | |
443 | | |
444 | | data_vec.ins(data_vec.size(),avg_vec*ones(avg_vec.size())/avg_vec.size()); |
445 | | data_matrix = mat(data_vec).T(); |
446 | | avg_vec.del(0,avg_vec.size()-1); |
447 | | |
448 | | vector<double> test_lognc; |
449 | | vec preds; |
450 | | |
451 | | for(list<model*>::iterator model_ref = models.begin();model_ref!=models.end();model_ref++) |
452 | | { |
453 | | (*model_ref)->data_update(data_vec.size()-1); |
454 | | |
455 | | if((*model_ref)->lognc_history.size()==0) |
456 | | { |
457 | | test_lognc.push_back(0); |
458 | | } |
459 | | else |
460 | | { |
461 | | test_lognc.push_back((ones((*model_ref)->lognc_history.size())*(*model_ref)->lognc_history)/(*model_ref)->lognc_history.size()*(max_window/(*model_ref)->window_size)); |
462 | | } |
463 | | |
464 | | pair<vec,vec> predictions = (*model_ref)->predict(500,data_vec.size()-1,&LapRNG); |
465 | | |
466 | | preds.ins(preds.size(),(predictions.first*predictions.second)/(predictions.first*ones(predictions.first.size()))); |
467 | | |
468 | | } |
469 | | |
470 | | //preds.ins(0,data_matrix.get(0,data_vec.size())); |
471 | | |
472 | | result_preds.ins_col(result_preds.cols(),preds); |
473 | | |
474 | | myfile.open(fstring,ios::app); |
475 | | |
476 | | // myfile << my_rarx->posterior->minimal_vertex->get_coordinates()[0]; |
477 | | |
478 | | for(int i = 0;i<test_lognc.size();i++) |
479 | | { |
480 | | myfile << test_lognc[i] << ','; |
481 | | } |
482 | | |
483 | | myfile << endl; |
484 | | |
485 | | myfile.close(); |
486 | | |
487 | | } |
488 | | |
| 316 | MSG msg; |
| 317 | BOOL MsgReturn = GetMessage ( &msg , NULL , 0 , 0 ); |
| 318 | |
| 319 | if(MsgReturn) |
| 320 | { |
| 321 | TranslateMessage(&msg); |
| 322 | DispatchMessage(&msg); |
| 323 | } |
| 324 | } |
| 325 | |
492 | | |
493 | | return 0; |
494 | | } |
495 | | |
496 | | /* |
497 | | // EXPERIMENT: A moving window estimation and prediction of RARX is tested on data generated from |
498 | | // y_t=0.95*y_(t-1)+0.05*y_(t-2)+0.2*e_t, where e_t is normally, student(4) and cauchy distributed. It |
499 | | // can be compared to the classical setup. |
500 | | |
501 | | vector<vector<string>> strings; |
502 | | |
503 | | char* file_string = "c:\\dataGCClosePercDiff"; |
504 | | |
505 | | char dfstring[80]; |
506 | | strcpy(dfstring,file_string); |
507 | | strcat(dfstring,".txt"); |
508 | | |
509 | | |
510 | | mat data_matrix; |
511 | | ifstream myfile(dfstring); |
| 329 | */ |
| 330 | |
| 331 | |
| 332 | |
| 333 | /* |
| 334 | // EXPERIMENT: 100 AR model generated time series of length of 30 from y_t=0.95*y_(t-1)+0.05*y_(t-2)+0.2*e_t, |
| 335 | // where e_t is normally, student(4) and cauchy distributed are tested using robust AR model, to obtain the |
| 336 | // variance of location parameter estimators and compare it to the classical setup. |
| 337 | vector<vector<vector<string>>> string_lists; |
| 338 | string_lists.push_back(vector<vector<string>>()); |
| 339 | string_lists.push_back(vector<vector<string>>()); |
| 340 | string_lists.push_back(vector<vector<string>>()); |
| 341 | |
| 342 | char* file_strings[3] = {"c:\\ar_normal.txt", "c:\\ar_student.txt", "c:\\ar_cauchy.txt"}; |
| 343 | |
| 344 | |
| 345 | for(int i = 0;i<3;i++) |
| 346 | { |
| 347 | ifstream myfile(file_strings[i]); |
526 | | data_matrix.ins_row(data_matrix.rows(),data_vector); |
527 | | } |
528 | | |
529 | | myfile.close(); |
530 | | } |
531 | | else |
532 | | { |
533 | | cout << "Can't open data file!" << endl; |
534 | | } |
535 | | */ |
536 | | |
537 | | |
538 | | // cout << "Updated." << endl; |
539 | | |
540 | | /* |
541 | | // EXPERIMENT: 100 AR model generated time series of length of 30 from y_t=0.95*y_(t-1)+0.05*y_(t-2)+0.2*e_t, |
542 | | // where e_t is normally, student(4) and cauchy distributed are tested using robust AR model, to obtain the |
543 | | // variance of location parameter estimators and compare it to the classical setup. |
544 | | vector<vector<vector<string>>> string_lists; |
545 | | string_lists.push_back(vector<vector<string>>()); |
546 | | string_lists.push_back(vector<vector<string>>()); |
547 | | string_lists.push_back(vector<vector<string>>()); |
548 | | |
549 | | char* file_strings[3] = {"c:\\ar_normal.txt", "c:\\ar_student.txt", "c:\\ar_cauchy.txt"}; |
550 | | |
551 | | |
552 | | for(int i = 0;i<3;i++) |
553 | | { |
554 | | ifstream myfile(file_strings[i]); |
555 | | if (myfile.is_open()) |
556 | | { |
557 | | while ( myfile.good() ) |
| 393 | if(conditions.size()>2) |
559 | | string line; |
560 | | getline(myfile,line); |
561 | | |
562 | | vector<string> parsed_line; |
563 | | while(line.find(',') != string::npos) |
564 | | { |
565 | | int loc = line.find(','); |
566 | | parsed_line.push_back(line.substr(0,loc)); |
567 | | line.erase(0,loc+1); |
568 | | } |
569 | | |
570 | | string_lists[i].push_back(parsed_line); |
571 | | } |
572 | | myfile.close(); |
573 | | } |
574 | | } |
575 | | |
576 | | for(int j = 0;j<string_lists.size();j++) |
577 | | { |
578 | | |
579 | | for(int i = 0;i<string_lists[j].size()-1;i++) |
580 | | { |
581 | | vector<vec> conditions; |
582 | | //emlig* emliga = new emlig(2); |
583 | | RARX* my_rarx = new RARX(2,30); |
584 | | |
585 | | for(int k = 1;k<string_lists[j][i].size();k++) |
586 | | { |
587 | | vec condition; |
588 | | //condition.ins(0,1); |
589 | | condition.ins(0,string_lists[j][i][k]); |
590 | | conditions.push_back(condition); |
591 | | |
592 | | //cout << "orig:" << condition << endl; |
593 | | |
594 | | if(conditions.size()>1) |
595 | | { |
596 | | conditions[k-2].ins(0,string_lists[j][i][k]); |
597 | | |
598 | | } |
599 | | |
600 | | if(conditions.size()>2) |
601 | | { |
602 | | conditions[k-3].ins(0,string_lists[j][i][k]); |
603 | | |
604 | | //cout << "modi:" << conditions[k-3] << endl; |
605 | | |
606 | | my_rarx->bayes(conditions[k-3]); |
607 | | |
608 | | |
609 | | //if(k>5) |
610 | | //{ |
611 | | // cout << "MaxLik coords:" << emliga->minimal_vertex->get_coordinates() << endl; |
612 | | //} |
613 | | |
614 | | } |
615 | | |
616 | | } |
617 | | |
618 | | //emliga->step_me(0); |
619 | | /* |
620 | | ofstream myfile; |
621 | | myfile.open("c:\\robust_ar1.txt",ios::app); |
622 | | myfile << my_rarx->minimal_vertex->get_coordinates()[0] << ";"; |
623 | | myfile.close(); |
624 | | |
625 | | myfile.open("c:\\robust_ar2.txt",ios::app); |
626 | | myfile << emliga->minimal_vertex->get_coordinates()[1] << ";"; |
627 | | myfile.close(); |
628 | | |
629 | | |
630 | | cout << "MaxLik coords:" << emliga->minimal_vertex->get_coordinates() << endl; |
631 | | cout << "Step: " << i << endl; |
632 | | } |
633 | | |
634 | | cout << "One experiment finished." << endl; |
635 | | |
| 395 | conditions[k-3].ins(0,string_lists[j][i][k]); |
| 396 | |
| 397 | //cout << "modi:" << conditions[k-3] << endl; |
| 398 | |
| 399 | my_rarx->bayes(conditions[k-3]); |
| 400 | |
| 401 | |
| 402 | //if(k>5) |
| 403 | //{ |
| 404 | // cout << "MaxLik coords:" << emliga->minimal_vertex->get_coordinates() << endl; |
| 405 | //} |
| 406 | |
| 407 | } |
| 408 | |
| 409 | } |
| 410 | |
| 411 | //emliga->step_me(0); |
| 412 | /* |
644 | | }*/ |
645 | | |
| 421 | |
| 422 | |
| 423 | cout << "MaxLik coords:" << emliga->minimal_vertex->get_coordinates() << endl; |
| 424 | cout << "Step: " << i << endl; |
| 425 | } |
| 426 | |
| 427 | cout << "One experiment finished." << endl; |
| 428 | |
| 429 | ofstream myfile; |
| 430 | myfile.open("c:\\robust_ar1.txt",ios::app); |
| 431 | myfile << endl; |
| 432 | myfile.close(); |
| 433 | |
| 434 | myfile.open("c:\\robust_ar2.txt",ios::app); |
| 435 | myfile << endl; |
| 436 | myfile.close(); |
| 437 | }*/ |
| 438 | |
| 439 | // EXPERIMENT: A moving window estimation and prediction of RARX is tested on data generated from |
| 440 | // y_t=0.95*y_(t-1)+0.05*y_(t-2)+0.2*e_t, where e_t is normally, student(4) and cauchy distributed. It |
| 441 | // can be compared to the classical setup. |
| 442 | |
| 443 | itpp::Laplace_RNG LapRNG = Laplace_RNG(); |
| 444 | |
| 445 | vector<vector<string>> strings; |
| 446 | |
| 447 | char* file_string = "c:\\ar_cauchy_single"; |
| 448 | |
| 449 | char dfstring[80]; |
| 450 | strcpy(dfstring,file_string); |
| 451 | strcat(dfstring,".txt"); |
| 452 | |
| 453 | |
| 454 | mat data_matrix; |
| 455 | ifstream myfile(dfstring); |
| 456 | if (myfile.is_open()) |
| 457 | { |
| 458 | string line; |
| 459 | while(getline(myfile,line)) |
| 460 | { |
| 461 | vec data_vector; |
| 462 | while(line.find(',') != string::npos) //zmenil som ciarku za medzeru |
| 463 | { |
| 464 | line.erase(0,1); // toto som sem pridal |
| 465 | int loc2 = line.find('\n'); |
| 466 | int loc = line.find(','); |
| 467 | data_vector.ins(data_vector.size(),atof(line.substr(0,loc).c_str())); |
| 468 | line.erase(0,loc+1); |
| 469 | } |
| 470 | |
| 471 | data_matrix.ins_row(data_matrix.rows(),data_vector); |
| 472 | } |
| 473 | |
| 474 | myfile.close(); |
| 475 | } |
| 476 | else |
| 477 | { |
| 478 | cout << "Can't open data file!" << endl; |
| 479 | } |
| 480 | |
| 481 | //konec nacitavania dat |
| 482 | set<set<pair<int,int>>> model_types = model::possible_models_recurse(max_model_order,data_matrix.rows()); //volanie funkce kde robi kombinace modelov |
| 483 | //to priradime do model_types, data_matrix.row urcuje pocet kanalov dat |
| 484 | vector<model*> models; |
| 485 | for(set<set<pair<int,int>>>::iterator model_type = model_types.begin();model_type!=model_types.end();model_type++) |
| 486 | {// prechadza rozne typy kanalov, a poctu regresorov |
| 487 | for(int window_size = 100;window_size < 101;window_size++) |
| 488 | { |
| 489 | models.push_back(new model((*model_type),true,true,window_size,0,&data_matrix)); // to su len konstruktory, len inicializujeme rozne typy |
| 490 | models.push_back(new model((*model_type),false,true,window_size,0,&data_matrix)); |
| 491 | models.push_back(new model((*model_type),true,false,window_size,0,&data_matrix)); |
| 492 | models.push_back(new model((*model_type),false,false,window_size,0,&data_matrix)); |
| 493 | } |
| 494 | |
| 495 | set<pair<int,int>> empty_list; |
| 496 | models.push_back(new model(empty_list,false,true,100,0,&data_matrix)); |
| 497 | } |
| 498 | |
| 499 | mat result_lognc; |
| 500 | // mat result_preds; |
| 501 | |
| 502 | for(int time = max_model_order;time<data_matrix.cols();time++) //time<data_matrix.cols() |
| 503 | { //pocet stlpcov data_matrix je pocet casovych krokov |
| 504 | vec cur_res_lognc; |
| 505 | // vec preds; |
| 506 | vector<string> nazvy; |
| 507 | for(vector<model*>::iterator model_ref = models.begin();model_ref!=models.end();model_ref++) |
| 508 | {//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 | (*model_ref)->data_update(time); //pozret sa preco je toto tu nutne |
| 510 | //if (time = max_model_order) nazvy.push_back(models.model_ref]);// ako by som mohol dostat nazov modelu? |
| 511 | |
| 512 | if((*model_ref)->my_rarx!=NULL) //vklada normalizacnz faktor do cur_res_lognc |
| 513 | { |
| 514 | cur_res_lognc.ins(cur_res_lognc.size(),(*model_ref)->my_rarx->posterior->log_nc); |
| 515 | } |
| 516 | else |
| 517 | { |
| 518 | cur_res_lognc.ins(cur_res_lognc.size(),(*model_ref)->my_arx->posterior().lognc()); |
| 519 | } |
| 520 | |
| 521 | // pair<vec,vec> predictions = (*model_ref)->predict(200,time,&LapRNG); |
| 522 | |
| 523 | // preds.ins(preds.size(),(predictions.first*predictions.second)/(predictions.first*ones(predictions.first.size()))); |
| 524 | // preds.ins(0,data_matrix.get(0,time+1)); |
| 525 | |
| 526 | } |
| 527 | |
| 528 | result_lognc.ins_col(result_lognc.cols(),cur_res_lognc); |
| 529 | // result_preds.ins_col(result_preds.cols(),preds); |
| 530 | |
| 531 | // cout << "Updated." << endl; |
| 532 | |