use of ambit2.core.data.model.ModelQueryResults in project ambit-mirror by ideaconsult.
the class SimpleModelBuilder method createModel.
protected ModelQueryResults createModel(Algorithm algorithm) throws AmbitException {
ModelQueryResults mr = new ModelQueryResults();
mr.setHidden(modelHidden);
mr.setContentMediaType(getMediaType(algorithm));
mr.setName(getName(algorithm));
mr.setContent(getContent(algorithm));
mr.setAlgorithm(alg_reporter.getURI(algorithm));
mr.setPredictors(algorithm.getInput());
if (parameters != null) {
mr.setParameters(parameters);
StringBuilder b = new StringBuilder();
for (String param : parameters) {
b.append(param);
b.append(",");
}
mr.setName(UUID.nameUUIDFromBytes(b.toString().getBytes()) + "-" + mr.getName());
}
return mr;
}
Aggregations