-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NUP-2401: Check for prediction results discrepancies #3558
Changes from all commits
80bb517
54a9d10
69841ff
6956e0c
956f569
fb95987
dc3cdbf
a771b84
93160cf
4ce9edc
9c77a66
21d82b1
b727b69
dc72590
fac2380
3c205af
d7e8593
0466c73
829db9d
6ad36cc
1bf77c5
c98d85e
d67f4e0
4b8cd85
3ea1d1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ def getPredictionResults(network, clRegionName): | |
N = classifierRegion.getSelf().maxCategoryCount | ||
results = {step: {} for step in steps} | ||
for i in range(len(steps)): | ||
# stepProbabilities: probabilities for this prediction step only. | ||
# stepProbabilities are probabilities for this prediction step only. | ||
stepProbabilities = probabilities[i * N:(i + 1) * N - 1] | ||
mostLikelyCategoryIdx = stepProbabilities.argmax() | ||
predictedValue = actualValues[mostLikelyCategoryIdx] | ||
|
@@ -143,11 +143,10 @@ def runHotgym(): | |
fiveStep = results[5]["predictedValue"] | ||
fiveStepConfidence = results[5]["predictionConfidence"] | ||
|
||
print("1-step: {:16} ({:4.4}%)\t" | ||
"5-step: {:16} ({:4.4}%)".format(oneStep, | ||
oneStepConfidence * 100, | ||
fiveStep, | ||
fiveStepConfidence * 100)) | ||
result = (oneStep, oneStepConfidence * 100, | ||
fiveStep, fiveStepConfidence * 100) | ||
print "1-step: {:16} ({:4.4}%)\t 5-step: {:16} ({:4.4}%)".format(*result) | ||
yield result | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the purpose of this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to access the data generated by I could have accumulated the prediction results in a list and returned the list. Let me know if you have a preference on how to do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No preference, just curious. |
||
|
||
|
||
if __name__ == "__main__": | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to pass these in a different order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? I just renamed the variables so that they are consistent with the other examples. Am I missing something?