Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Imène Lajili
clowdflows
Commits
b1f524e2
Commit
b1f524e2
authored
Jan 23, 2013
by
Janez K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dodal confusion matrix computations za weko
parent
444fb10e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
436 additions
and
299 deletions
+436
-299
workflows/weka/db/package_data.json
workflows/weka/db/package_data.json
+405
-266
workflows/weka/library.py
workflows/weka/library.py
+31
-33
No files found.
workflows/weka/db/package_data.json
View file @
b1f524e2
This diff is collapsed.
Click to expand it.
workflows/weka/library.py
View file @
b1f524e2
import
re
def
weka_create_integers
(
input_dict
):
intStr
=
input_dict
[
'intStr'
]
intList
=
[]
for
i
in
re
.
findall
(
r
'\w+'
,
intStr
):
try
:
intList
.
append
(
int
(
i
))
except
:
pass
if
input_dict
[
'sort'
].
lower
()
==
"true"
:
intList
.
sort
()
return
{
'intList'
:
intList
}
def
weka_sum_integers
(
input_dict
):
intList
=
input_dict
[
'intList'
]
return
{
'sum'
:
sum
(
intList
)}
def
weka_pre_filter_integers
(
input_dict
):
return
input_dict
def
weka_post_filter_integers
(
postdata
,
input_dict
,
output_dict
):
intListOut
=
postdata
[
'intListOut'
]
intList
=
[]
for
i
in
intListOut
:
try
:
intList
.
append
(
int
(
i
))
except
:
pass
return
{
'intList'
:
intList
}
def
weka_pre_display_summation
(
input_dict
):
return
{}
\ No newline at end of file
def
weka_statistics
(
input_dict
):
summary
=
input_dict
[
'summary'
]
class_index
=
int
(
input_dict
[
'classIndex'
])
summary_lines
=
summary
.
split
(
'
\n
'
)[
3
:]
summary_lines
.
pop
()
if
class_index
>-
1
:
line
=
summary_lines
[
class_index
]
splitline
=
line
.
split
()
tp_rate
=
splitline
[
0
]
fp_rate
=
splitline
[
1
]
precision
=
splitline
[
2
]
recall
=
splitline
[
3
]
f
=
splitline
[
4
]
auc
=
splitline
[
5
]
else
:
avg_line
=
summary_lines
.
pop
()
splitline
=
avg_line
.
split
()[
2
:]
tp_rate
=
splitline
[
0
]
fp_rate
=
splitline
[
1
]
precision
=
splitline
[
2
]
recall
=
splitline
[
3
]
f
=
splitline
[
4
]
auc
=
splitline
[
5
]
output_dict
=
{}
output_dict
[
'precision'
]
=
precision
output_dict
[
'recall'
]
=
recall
output_dict
[
'auc'
]
=
auc
output_dict
[
'tp_rate'
]
=
tp_rate
output_dict
[
'fp_rate'
]
=
fp_rate
output_dict
[
'f'
]
=
f
return
output_dict
\ No newline at end of file
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