configure_external_test
Created: 2013-12-24 12:23:52
Last updated: 2015-04-04 20:31:11
Displays an interface allowing configuration of external test.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Configure external tests. |
Descriptions (1)
Prompt for external test parameters, so far just asking if the user wants to perform cross validation and which value must be measured (AUC and/or omission). |
Dependencies (0)
Inputs (2)
Name |
Description |
sentinel |
Port used to control activation of this workflow.
|
all_points_xml |
All species occurrence points in openModeller XML format. They are assumed to be presence-only points.
|
Processors (3)
Name |
Type |
Description |
Interaction |
interaction |
|
allocate_points |
beanshell |
Scriptimport java.util.ArrayList;
import java.io.StringReader;
import java.io.BufferedReader;
ArrayList training_points = new ArrayList();
ArrayList testing_points = new ArrayList();
ArrayList flag = new ArrayList();
String xval_test = "xval";
if (choice.equals(xval_test)) {
flag.add(1);
}
else {
return;
}
BufferedReader reader = new BufferedReader(new StringReader(all_points));
ArrayList my_all_points = new ArrayList();
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
my_all_points.add(line);
}
long seed = System.nanoTime();
Collections.shuffle(my_all_points, new Random(seed));
int num_folds = Integer.parseInt(folds);
int num_points = my_all_points.size();
for (int k = 0; k < num_folds; ++k) {
StringBuilder creation_builder = new StringBuilder();
StringBuilder testing_builder = new StringBuilder();
for (int i = 0; i < num_points; ++i) {
if (i % num_folds == k) {
testing_builder.append(my_all_points.get(i));
} else {
creation_builder.append(my_all_points.get(i));
}
}
training_points.add( creation_builder.toString() );
testing_points.add( testing_builder.toString() );
} |
count_points |
beanshell |
Scriptimport java.io.StringReader;
import java.io.BufferedReader;
BufferedReader reader = new BufferedReader(new StringReader(all_points));
int num_points = 0;
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
++num_points;
}
|
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
allocate_points |
|
all_points
folds
choice
|
training_points
testing_points
flag
|
count_points |
|
all_points
|
num_points
|
Outputs (6)
Name |
Description |
flag |
Flag indicating if cross-validation should be performed. It contains a list with a single element if yes, otherwise an empty list. This can be used to control execution of subsequent workflows.
|
testing_points |
List of sets of XML points to be used in model testing. The size of the list is the number of chosen replicates.
|
training_points |
List of sets of XML points to be used in model training. The size of the list is the number of chosen replicates.
|
measure_auc |
Indicates if AUC should be calculated in external tests. "yes" or "no".
|
calculate_matrix |
Indicates if confusion matrix should be calculated in external tests. "yes" or "no".
|
threshold |
Threshold to be used for threshold-dependent tests. It can be a fixed value or "lpt".
|
Datalinks (11)
Source |
Sink |
count_points:num_points |
Interaction:num_points |
all_points_xml |
allocate_points:all_points |
Interaction:choice |
allocate_points:choice |
Interaction:replicates |
allocate_points:folds |
all_points_xml |
count_points:all_points |
allocate_points:flag |
flag |
allocate_points:testing_points |
testing_points |
allocate_points:training_points |
training_points |
Interaction:measure_auc |
measure_auc |
Interaction:calculate_matrix |
calculate_matrix |
Interaction:threshold |
threshold |
Uploader
Component Validity
Loading
License
All versions of this Workflow are
licensed under:
Version 1 (earliest)
(of 5)
Credits (0)
(People/Groups)
None
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (1)
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment