Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
Hotfix for split validation issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
AValsamis committed Nov 2, 2016
1 parent 1f95a44 commit 9fce240
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,30 @@ public Response splitValidateAlgorithm(
options.put("dataset_uri", datasetURI);
options.put("algorithm_params", algorithmParameters);
options.put("prediction_feature", predictionFeature);
options.put("transformations", transformations);
options.put("scaling", scaling);
options.put("split_ratio", splitRatio);
options.put("stratify", stratify);
options.put("seed", seed);
options.put("type", "SPLIT");
options.put("subjectId", subjectId);

Map<String, String> transformationAlgorithms = new LinkedHashMap<>();
if (transformations != null && !transformations.isEmpty()) {
transformationAlgorithms.put(uriInfo.getBaseUri().toString() + "algorithm/pmml",
"{\"transformations\" : \"" + transformations + "\"}");
}
if (scaling != null && !scaling.isEmpty()) {
transformationAlgorithms.put(scaling, "");
}
if (!transformationAlgorithms.isEmpty()) {
String transformationAlgorithmsString = serializer.write(transformationAlgorithms);
LOG.log(Level.INFO, "Transformations:{0}", transformationAlgorithmsString);
options.put("transformations", transformationAlgorithmsString);
}

taskHandler.create(task);
System.out.println(crossValidationQueue.getTopicName());
System.out.println(splitValidationQueue.getTopicName());
jmsContext.createProducer().setDeliveryDelay(1000).send(splitValidationQueue, options);

return Response.ok(task).build();
}

Expand Down

0 comments on commit 9fce240

Please sign in to comment.