You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::transform(var.begin(), var.end(), avg.begin(), var.begin(), [](double a, double b) {returnabs(a - b * b); });
237
+
varQoI = var;
215
238
216
239
// Normalized effective matrix
217
240
for (auto& row : gmat_eff)
@@ -536,7 +559,8 @@ void runGSA::runMultipleGSA(vector<vector<double>> gmat_red, int Kos)
536
559
537
560
voidrunGSA::runSingleCombGSA(vector<vector<double>> gmat, int Ko, vector<int> comb, vector<double>& Si, char Opt)
538
561
{
539
-
//
562
+
563
+
//
540
564
// we will ignore NaN in gvec
541
565
//
542
566
@@ -576,6 +600,7 @@ void runGSA::runSingleCombGSA(vector<vector<double>> gmat, int Ko, vector<int> c
576
600
gvec.reserve(nmc);
577
601
for (int i = 0; i < nmc; i++) {
578
602
gvec.push_back(gmat[i][nq]);
603
+
// std::cout<<gmat[i][nq]<<std::endl;
579
604
}
580
605
581
606
@@ -654,6 +679,7 @@ void runGSA::runSingleCombGSA(vector<vector<double>> gmat, int Ko, vector<int> c
654
679
count_valid = 0;
655
680
for (int ns = 0; ns < nmc; ns++)
656
681
{
682
+
//std::cout << gvec[ns] << std::endl;
657
683
// Only if g is not NaN
658
684
if (!std::isnan(gvec[ns])) {
659
685
data(ne, count_valid) = xval[ns][idx];
@@ -677,8 +703,10 @@ void runGSA::runSingleCombGSA(vector<vector<double>> gmat, int Ko, vector<int> c
677
703
Kthres = nmc_new / 10; // main
678
704
}
679
705
706
+
680
707
while (1) {
681
708
709
+
682
710
try
683
711
{
684
712
status = model.learn(data, Kos, maha_dist, static_subset, 1000, 1000, V * 1.e-12, false);// max kmeans iter = 100, max EM iter = 200, convergence variance = V*1.e-15
0 commit comments