Search in sources :

Example 36 with ModelQueryResults

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;
}
Also used : ModelQueryResults(ambit2.core.data.model.ModelQueryResults)

Aggregations

ModelQueryResults (ambit2.core.data.model.ModelQueryResults)24 AmbitException (net.idea.modbcum.i.exceptions.AmbitException)23 ResourceException (org.restlet.resource.ResourceException)21 PredictedVarsTemplate (ambit2.base.data.PredictedVarsTemplate)13 Template (ambit2.base.data.Template)13 IOException (java.io.IOException)10 Form (org.restlet.data.Form)9 Property (ambit2.base.data.Property)8 EvaluationStats (ambit2.model.evaluation.EvaluationStats)7 IEvaluation (ambit2.core.data.model.IEvaluation)6 LiteratureEntry (ambit2.base.data.LiteratureEntry)5 PropertyAnnotation (ambit2.base.data.PropertyAnnotation)5 PropertyAnnotations (ambit2.base.data.PropertyAnnotations)5 AlgorithmURIReporter (ambit2.rest.algorithm.AlgorithmURIReporter)5 Reference (org.restlet.data.Reference)5 EVStatsType (ambit2.core.data.model.IEvaluation.EVStatsType)4 CreateModel (ambit2.db.update.model.CreateModel)3 ModelPredictor (ambit2.rest.model.predictor.ModelPredictor)3 WekaException (weka.core.WekaException)3 Remove (weka.filters.unsupervised.attribute.Remove)3