aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/edu/brown/cs/student/term/Main.java4
-rw-r--r--src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/edu/brown/cs/student/term/Main.java b/src/main/java/edu/brown/cs/student/term/Main.java
index 7ee9874..3cba37a 100644
--- a/src/main/java/edu/brown/cs/student/term/Main.java
+++ b/src/main/java/edu/brown/cs/student/term/Main.java
@@ -78,12 +78,12 @@ public final class Main {
setConnection.run(new String[] {"data/trades.sqlite3"});
}
- if (!options.has("debug")) {
+ /*if (!options.has("debug")) {
System.setErr(new PrintStream(new OutputStream() {
public void write(int b) {
}
}));
- }
+ }*/
HashMap<String, Command> commandHashMap = new HashMap<>();
diff --git a/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java b/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java
index fbe05f7..09b6cc1 100644
--- a/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java
+++ b/src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java
@@ -51,12 +51,14 @@ public class SuspicionRanker {
LinkMapper lm = new LinkMapper(querier);
HubSearch hub = new HubSearch(lm);
Map<Holder, Double> holderToHubScore = hub.runHubSearch(start, end);
+ System.out.println("gets past the hub score");
ProfitCalculation pc = new ProfitCalculation(DatabaseQuerier.getConn(), "",
new Date(start.toEpochMilli()),
new Date(end.toEpochMilli()));
Map<Integer, Double> profitMap = pc.getProfitMap();
+ System.out.println("gets past the profit map");
//if the maps are empty, we abort because we have entirely incomplete data
if(profitMap.isEmpty() || holderToHubScore.isEmpty()){
@@ -81,7 +83,6 @@ public class SuspicionRanker {
for (Holder guy : holderToHubScore.keySet()) {
double normalizedProfitScore = profitMap.get(guy.getId()) / profitMax;
-
double normalizedHubScore = holderToHubScore.get(guy) / hubMax;
double suspicionScore = normalizedHubScore * 0.6 + normalizedProfitScore * 0.4;
guy.setSuspicionScore(suspicionScore);