Skip to content

Commit

Permalink
a few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskelvinlee committed Dec 9, 2011
1 parent 8f64ddc commit 2ba56a2
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
Binary file added plots/heatmap3_crop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions reruns/query_re13.txt
Expand Up @@ -9,23 +9,23 @@ Answer: 0 0 2 2 0
Confidence: 51 53 47 48 56

#####
Total Time: 0.078253
Total Time: 0.092898
NLTK Time: 0.000000
AI Time: 0.078253
AI Time: 0.092898
URL Time: 0.000000
Keyword (Q) Time: 0.000000
Keyword (A) Time: 0.000000
Tokens (Q) Time: 0.000000
Tokens (URL) Time: 0.000000
Map Instance Time: 0.000000
Score1 Time: 0.009126
Score2 Time: 0.004163
Score3 Time: 0.019061
Score4 Time: 0.045746
Score1 Time: 0.013247
Score2 Time: 0.006286
Score3 Time: 0.028048
Score4 Time: 0.045205
#####

raw results:
[{'storm coming': 1.0, 'cloudy': 1.5, 'fair': 5.0}, {'storm coming': 9.333333333333334, 'cloudy': 1.0, 'fair': 3.3333333333333335}, {'storm coming': 1.793161231884058, 'cloudy': 1.0, 'fair': 1.1422101449275361}, {'storm coming': 1.1770491803278689, 'cloudy': 1.0, 'fair': 7.918032786885246}]
[{'storm coming': 2, 'cloudy': 3, 'fair': 10}, {'storm coming': 28, 'cloudy': 3, 'fair': 10}, {'storm coming': 79186, 'cloudy': 44160, 'fair': 50440}, {'storm coming': 718, 'cloudy': 610, 'fair': 4830}]

score_result1: {'storm coming': 1.0, 'cloudy': 1.5, 'fair': 5.0}
score_result2: {'storm coming': 9.333333333333334, 'cloudy': 1.0, 'fair': 3.3333333333333335}
Expand Down
12 changes: 6 additions & 6 deletions reruns/query_re14.txt
Expand Up @@ -9,19 +9,19 @@ Answer: 9 9 9 9 9
Confidence: 40 40 40 40 40

#####
Total Time: 0.029946
Total Time: 0.029377
NLTK Time: 0.000000
AI Time: 0.029946
AI Time: 0.029377
URL Time: 0.000000
Keyword (Q) Time: 0.000000
Keyword (A) Time: 0.000000
Tokens (Q) Time: 0.000000
Tokens (URL) Time: 0.000000
Map Instance Time: 0.000000
Score1 Time: 0.005745
Score2 Time: 0.002188
Score3 Time: 0.007991
Score4 Time: 0.013936
Score1 Time: 0.005833
Score2 Time: 0.002196
Score3 Time: 0.007833
Score4 Time: 0.013446
#####

raw results:
Expand Down
14 changes: 7 additions & 7 deletions reruns/query_re15.txt
Expand Up @@ -9,23 +9,23 @@ Answer: 0 0 0 0 0
Confidence: 76 54 54 99 99

#####
Total Time: 0.116955
Total Time: 0.121805
NLTK Time: 0.000000
AI Time: 0.116955
AI Time: 0.121805
URL Time: 0.000000
Keyword (Q) Time: 0.000000
Keyword (A) Time: 0.000000
Tokens (Q) Time: 0.000000
Tokens (URL) Time: 0.000000
Map Instance Time: 0.000000
Score1 Time: 0.025369
Score2 Time: 0.008458
Score3 Time: 0.034950
Score4 Time: 0.048050
Score1 Time: 0.024602
Score2 Time: 0.008098
Score3 Time: 0.036259
Score4 Time: 0.052745
#####

raw results:
[{'Italy': 4.5, 'France': 1.0}, {'Italy': 4.5, 'France': 1.0}, {'Italy': 4229.0, 'France': 1.0}, {'Italy': 29570, 'France': 0}]
[{'Italy': 9, 'France': 2}, {'Italy': 9, 'France': 2}, {'Italy': 84580, 'France': 20}, {'Italy': 29570, 'France': 0}]

score_result1: {'Italy': 4.5, 'France': 1.0}
score_result2: {'Italy': 4.5, 'France': 1.0}
Expand Down
10 changes: 7 additions & 3 deletions test.py
Expand Up @@ -37,7 +37,7 @@ def runQuery( questions, scoringFunction, cache=False):
weights = score(choices, nltk_data, scoringFunction)
results = weights[0] # array of size 4
ai_time = weights[1] # array of size 4
results_raw = results
results_raw = str(results)

print "Determining Answer..."
# Normalize to determine answer
Expand All @@ -62,19 +62,23 @@ def runQuery( questions, scoringFunction, cache=False):
print bld

print str(numberCorrect) + "/" + str(len(questions))

"""
runQuery(tp_Questions0, useAllScores, cache=True)
runQuery(tp_Questions1, useAllScores, cache=True)
runQuery(tp_Questions2, useAllScores, cache=True)
runQuery(tp_Questions3, useAllScores, cache=True)
"""
runQuery(tp_Questions4, useAllScores, cache=True)
runQuery(tp_Questions5, useAllScores, cache=True)

"""runQuery(tp_Questions5, useAllScores, cache=True)
runQuery(tp_Questions6, useAllScores, cache=True)
runQuery(tp_Questions7, useAllScores, cache=True)
runQuery(tp_Questions8, useAllScores, cache=True)
runQuery(tp_Questions9, useAllScores, cache=True)
runQuery(tp_Questions10, useAllScores, cache=True)
runQuery(tp_Questions11, useAllScores, cache=True)
"""



0 comments on commit 2ba56a2

Please sign in to comment.