EnigmaSong / nethist

R package for Network histogram
https://enigmasong.github.io/nethist/
Other
2 stars 1 forks source link

Checking update criteria #21

Closed EnigmaSong closed 1 year ago

EnigmaSong commented 1 year ago

old code

      // Metroplis or greedy step; if trial clustering accepted, then update current <-- trial
      if(trialLL > bestLL){
        bestACounts = trialACounts;
        bestClusterInds = trialClusterInds;
        bestLabelVec = trialLabelVec;
        bestLL = trialLL;
      }
    }
    // Keep track of best clustering overall
    if (bestLL > oldbestLL){// replace and save if trialLL is an improvement
      oldbestLL = bestLL;
      bestCount++;
    }