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
cee52363
Commit
cee52363
authored
Jan 24, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More work on adding predictors to generic set
parent
ea255e9f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
predictor_set.py
+11
-2
No files found.
predictor_set.py
View file @
cee52363
...
...
@@ -22,7 +22,7 @@ class AlgorithmTypes(object):
class
PredictorSet
(
object
):
def
__init__
(
self
,
type
=
"train"
,
algorithm
=
AlgorithmTypes
.
regression
):
def
__init__
(
self
,
type
=
"train"
,
algorithm
=
AlgorithmTypes
.
regression
):
"""
Initialize variables and check essay set type
"""
...
...
@@ -92,10 +92,19 @@ class PredictorSet(object):
log
.
exception
(
error_message
)
raise
util_functions
.
InputError
(
textual_features
,
error_message
)
#Create essay sets for textual features if needed
if
len
(
self
.
_textual_features
)
==
0
:
for
i
in
xrange
(
0
,
len
(
textual_features
)):
self
.
essay_sets
.
append
()
self
.
essay_sets
.
append
(
EssaySet
(
type
=
self
.
_type
)
)
#Add numeric and textual features
self
.
_numeric_features
.
append
(
numeric_features
)
self
.
_textual_features
.
append
(
textual_features
)
#Add targets
self
.
_target
.
append
(
target
)
#Add textual features to essay sets
for
i
in
xrange
(
0
,
len
(
textual_features
)):
self
.
essay_sets
[
i
]
.
add_essay
(
textual_features
[
i
],
target
[
i
])
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