Skip to content

Commit

Permalink
scorecomplex learningRate=0 issue solved
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosub-Kim committed Jan 31, 2024
1 parent 095102f commit 6555024
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/strucclustutils/createcomplexreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const float CLUSTERING_STEPS = 100.0;
const float DEF_DIST = -1.0;
const float DEF_BIT_SCORE = -1.0;
const int UNINITIALIZED = 0;
const unsigned int FINISH_CLUSTERING = 2;
typedef std::pair<std::string, std::string> compNameChainName_t;
typedef std::map<unsigned int, unsigned int> chainKeyToComplexId_t;
typedef std::map<unsigned int, std::vector<unsigned int>> complexIdToChainKeys_t;
Expand Down
5 changes: 4 additions & 1 deletion src/strucclustutils/scorecomplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class DBSCANCluster {

unsigned int runDBSCAN() {
initializeAlnLabels();
if (eps > maxDist) return finishDBSCAN();
if (eps >= maxDist) return finishDBSCAN();
for (size_t centerAlnIdx=0; centerAlnIdx < searchResult.alnVec.size(); centerAlnIdx++) {
ChainToChainAln &centerAln = searchResult.alnVec[centerAlnIdx];
if (centerAln.label != 0)
Expand Down Expand Up @@ -472,6 +472,9 @@ class DBSCANCluster {
neighbors.emplace_back(alnIdx);
}
if (checkChainRedundancy()) {
neighbors.clear();
if (searchResult.alnVec.size() < FINISH_CLUSTERING)
finishDBSCAN();
fillDistMap();
return runDBSCAN();
}
Expand Down

0 comments on commit 6555024

Please sign in to comment.