@Path(value="model/{name}")
public class ModelOperator
extends java.lang.Object
Constructor and Description |
---|
ModelOperator() |
Modifier and Type | Method and Description |
---|---|
Dataset |
assembleDataset(java.util.List<java.lang.String> entryNames)
Given a list of entry names, parse them to make a dataset
|
javax.ws.rs.core.StreamingOutput |
downloadDataset()
Download the model file via serialization
|
javax.ws.rs.core.StreamingOutput |
downloadModel()
Download the model file via serialization
|
java.lang.String |
generateAttributes(java.lang.String userInput)
Generate attributes with the dataset for a certain model
|
protected java.util.List<java.lang.String> |
getEntryData(java.lang.String userInput)
Given a JSON file send from a user, get the names of entries to be run
|
java.lang.String |
getModelInfo()
Get information about the model
|
java.lang.String |
runModel(java.lang.String userInput)
Run a certain model
|
@GET @Produces(value="application/json") @Path(value="info") public java.lang.String getModelInfo()
@GET @Produces(value="application/octet-stream") @Path(value="model") public javax.ws.rs.core.StreamingOutput downloadModel()
@GET @Produces(value="application/octet-stream") @Path(value="dataset") public javax.ws.rs.core.StreamingOutput downloadDataset()
@POST @Produces(value="application/json") @Path(value="attributes") public java.lang.String generateAttributes(@FormParam(value="entries") java.lang.String userInput)
{ 'attributes': [list of attribute names], 'entries': [list of entries, their names and attributes] }
@POST @Produces(value="application/json") @Path(value="run") public java.lang.String runModel(@FormParam(value="entries") java.lang.String userInput)
{ 'possibleClasses': [list of class names], <-- Only if classification model 'units': [units], <-- Only if a regression model 'entries': [list of entries, their names predicted values] }
public Dataset assembleDataset(java.util.List<java.lang.String> entryNames)
entryNames
- Names of entries to be parsedprotected java.util.List<java.lang.String> getEntryData(java.lang.String userInput)
userInput
- Input from user