Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alain Shakour
clowdflows
Commits
fb300a18
Commit
fb300a18
authored
Jan 21, 2013
by
Janez K
Browse files
dodal dva widgeta v orange paket
parent
691abe68
Changes
2
Hide whitespace changes
Inline
Side-by-side
workflows/cforange/library.py
View file @
fb300a18
import
re
def
cforange_split_dataset
(
input_dict
):
import
orange
output_dict
=
{}
...
...
@@ -9,4 +7,4 @@ def cforange_split_dataset(input_dict):
test_data
=
data
.
select
(
selection
,
1
)
output_dict
[
'train_data'
]
=
train_data
output_dict
[
'test_data'
]
=
test_data
return
output_dict
\ No newline at end of file
return
output_dict
workflows/library.py
View file @
fb300a18
...
...
@@ -21,6 +21,39 @@ def add_multiple(input_dict):
output_dict
[
'sum'
]
=
int
(
i
)
+
output_dict
[
'sum'
]
return
output_dict
def
cforange_score_estimation
(
input_dict
):
import
orange
import
orngFSS
data
=
input_dict
[
'dataset'
]
ma
=
orngFSS
.
attMeasure
(
data
,
orange
.
MeasureAttribute_relief
(
k
=
int
(
input_dict
[
'k'
]),
m
=
int
(
input_dict
[
'm'
])))
output_string
=
""
output_dict
=
{}
output_dict
[
'results'
]
=
ma
return
output_dict
def
cforange_best_natts
(
input_dict
):
import
orange
import
orngFSS
data
=
input_dict
[
'dataset'
]
scores
=
input_dict
[
'scores'
]
n
=
int
(
input_dict
[
'n'
])
new_dataset
=
orngFSS
.
selectBestNAtts
(
data
,
scores
,
n
)
output_dict
=
{}
output_dict
[
'new_dataset'
]
=
new_dataset
return
output_dict
def
cforange_atts_above_thresh
(
input_dict
):
import
orange
import
orngFSS
data
=
input_dict
[
'dataset'
]
scores
=
input_dict
[
'scores'
]
thresh
=
float
(
input_dict
[
'thresh'
])
new_dataset
=
orngFSS
.
selectAttsAboveThresh
(
data
,
scores
,
thresh
)
output_dict
=
{}
output_dict
[
'new_dataset'
]
=
new_dataset
return
output_dict
def
delay
(
input_dict
,
widget
):
widget
.
progress
=
0
widget
.
save
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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