Skip to content

Commit

Permalink
eps related update revoke
Browse files Browse the repository at this point in the history
  • Loading branch information
Woosub-Kim committed Jan 31, 2024
1 parent 6555024 commit 6e632c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/strucclustutils/createcomplexreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ const unsigned int CLUSTERED = 1;
const unsigned int MIN_PTS = 2;
const unsigned int SINGLE_CHAINED_COMPLEX = 1;
const float BIT_SCORE_MARGIN = 0.9;
const float CLUSTERING_STEPS = 100.0;
const float DEF_DIST = -1.0;
//const float CLUSTERING_STEPS = 100.0;
//const float DEF_DIST = -1.0;
const float DEF_BIT_SCORE = -1.0;
const int UNINITIALIZED = 0;
const float LEARNING_RATE = 0.1;
const float DEFAULT_EPS = 0.1;
const unsigned int FINISH_CLUSTERING = 2;
typedef std::pair<std::string, std::string> compNameChainName_t;
typedef std::map<unsigned int, unsigned int> chainKeyToComplexId_t;
Expand Down
12 changes: 7 additions & 5 deletions src/strucclustutils/scorecomplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ class DBSCANCluster {
finalClusters.clear();
prevMaxClusterSize = 0;
maxDist = 0;
eps = DEFAULT_EPS;
learningRate = LEARNING_RATE;
}

unsigned int getAlnClusters() {
Expand All @@ -316,7 +318,7 @@ class DBSCANCluster {
SearchResult &searchResult;
float eps;
float maxDist;
float minDist;
// float minDist;
float learningRate;
unsigned int cLabel;
unsigned int prevMaxClusterSize;
Expand Down Expand Up @@ -405,20 +407,20 @@ class DBSCANCluster {

void fillDistMap() {
float dist;
minDist = DEF_DIST;
// minDist = DEF_DIST;
distMap.clear();
for (size_t i=0; i < searchResult.alnVec.size(); i++) {
ChainToChainAln &prevAln = searchResult.alnVec[i];
for (size_t j = i+1; j < searchResult.alnVec.size(); j++) {
ChainToChainAln &currAln = searchResult.alnVec[j];
dist = prevAln.getDistance(currAln);
maxDist = std::max(maxDist, dist);
minDist = minDist<UNINITIALIZED ? dist : std::min(minDist, dist);
// minDist = minDist<UNINITIALIZED ? dist : std::min(minDist, dist);
distMap.insert({{i,j}, dist});
}
}
eps = minDist;
learningRate = (maxDist - minDist) / CLUSTERING_STEPS;
// eps = minDist;
// learningRate = (maxDist - minDist) / CLUSTERING_STEPS;
// eps = 0.1;
// learningRate = 0.1;
}
Expand Down

0 comments on commit 6e632c3

Please sign in to comment.