Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ease
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
ease
Commits
d9b47a73
Commit
d9b47a73
authored
Dec 06, 2012
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some error handling
parent
e86966aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
grade.py
+2
-1
model_creator.py
+4
-1
No files found.
grade.py
View file @
d9b47a73
...
@@ -56,7 +56,8 @@ def grade(grader_data,grader_config,submission,sandbox=None):
...
@@ -56,7 +56,8 @@ def grade(grader_data,grader_config,submission,sandbox=None):
#Try to determine confidence level
#Try to determine confidence level
try
:
try
:
min_score
=
min
(
grader_data
[
'score'
])
min_score
=
min
(
numpy
.
asarray
(
grader_data
[
'score'
]))
log
.
debug
(
grader_data
[
'score'
])
raw_confidence
=
grader_data
[
'model'
]
.
predict_proba
(
grader_feats
)[
0
,(
results
[
'score'
]
-
min_score
)]
raw_confidence
=
grader_data
[
'model'
]
.
predict_proba
(
grader_feats
)[
0
,(
results
[
'score'
]
-
min_score
)]
#TODO: Normalize confidence somehow here
#TODO: Normalize confidence somehow here
results
[
'confidence'
]
=
raw_confidence
results
[
'confidence'
]
=
raw_confidence
...
...
model_creator.py
View file @
d9b47a73
...
@@ -94,8 +94,11 @@ def get_cv_error(clf,feats,scores):
...
@@ -94,8 +94,11 @@ def get_cv_error(clf,feats,scores):
results
[
'mae'
]
=
err
results
[
'mae'
]
=
err
results
[
'kappa'
]
=
kappa
results
[
'kappa'
]
=
kappa
results
[
'success'
]
=
True
results
[
'success'
]
=
True
except
ValueError
:
#If this is hit, everything is fine. It is hard to explain why the error occurs, but it isn't a big deal.
log
.
exception
(
"Not enough classes (0,1,etc) in each cross validation fold."
)
except
:
except
:
log
.
debug
(
"Error getting cv error estimates."
)
log
.
exception
(
"Error getting cv error estimates."
)
return
results
return
results
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment