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
18fdc2ab
Commit
18fdc2ab
authored
Feb 27, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix argument passing
parent
838cde83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
grade.py
+3
-3
No files found.
grade.py
View file @
18fdc2ab
...
...
@@ -161,7 +161,7 @@ def grade_generic(grader_data, numeric_features, textual_features):
return
results
def
get_confidence_value
(
algorithm
,
model
,
grader_feats
,
score
):
def
get_confidence_value
(
algorithm
,
model
,
grader_feats
,
score
,
scores
):
"""
Determines a confidence in a certain score, given proper input parameters
algorithm- from util_functions.AlgorithmTypes
...
...
@@ -169,8 +169,8 @@ def get_confidence_value(algorithm,model,grader_feats,score):
grader_feats - a row of features used by the model for classification/regression
score - The score assigned to the submission by a prior model
"""
min_score
=
min
(
numpy
.
asarray
(
score
))
max_score
=
max
(
numpy
.
asarray
(
score
))
min_score
=
min
(
numpy
.
asarray
(
score
s
))
max_score
=
max
(
numpy
.
asarray
(
score
s
))
if
algorithm
==
util_functions
.
AlgorithmTypes
.
classification
:
#If classification, predict with probability, which gives you a matrix of confidences per score point
raw_confidence
=
model
.
predict_proba
(
grader_feats
)[
0
,(
score
-
min_score
)]
...
...
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