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
862c1637
Commit
862c1637
authored
Jan 24, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on a generic ml algorithm
parent
c6664d06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
create.py
+4
-0
grade.py
+0
-2
predictor_set.py
+41
-0
No files found.
create.py
View file @
862c1637
...
@@ -43,3 +43,7 @@ def create(text,score,prompt_string,model_path):
...
@@ -43,3 +43,7 @@ def create(text,score,prompt_string,model_path):
return
results
return
results
def
create_generic
(
numeric_values
,
textual_values
,
target
,
model_path
):
pass
grade.py
View file @
862c1637
...
@@ -100,6 +100,4 @@ def grade(grader_data,grader_config,submission):
...
@@ -100,6 +100,4 @@ def grade(grader_data,grader_config,submission):
return
results
return
results
predictor_set.py
0 → 100644
View file @
862c1637
import
numpy
import
nltk
import
sys
import
random
import
os
import
logging
base_path
=
os
.
path
.
dirname
(
__file__
)
sys
.
path
.
append
(
base_path
)
import
util_functions
if
not
base_path
.
endswith
(
"/"
):
base_path
=
base_path
+
"/"
log
=
logging
.
getLogger
(
__name__
)
class
AlgorithmTypes
(
object
):
regression
=
"regression"
classification
=
"classifiction"
class
PredictorSet
(
object
):
def
__init__
(
self
,
type
=
"train"
,
algorithm
=
AlgorithmTypes
.
regression
):
"""
Initialize variables and check essay set type
"""
if
(
type
!=
"train"
and
type
!=
"test"
):
type
=
"train"
if
(
algorithm
not
in
[
AlgorithmTypes
.
regression
,
AlgorithmTypes
.
classification
]):
algorithm
=
AlgorithmTypes
.
regression
self
.
_type
=
type
self
.
_target
=
[]
self
.
_textual_features
=
[]
self
.
_numeric_features
=
[]
self
.
essay_sets
=
[]
def
add_row
(
self
,
numeric_features
,
textual_features
,
target
):
pass
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