public interface ModelsServiceProvider
Modifier and Type | Method and Description |
---|---|
void |
activate(String modelName)
Activates the model with name
modelName if it was inactive. |
OutputRecord |
applyModel(String modelName,
Record inputRecord)
Apply a model to a record and return an output record using the default
ApplySettings . |
OutputRecord |
applyModel(String modelName,
Record inputRecord,
ApplySettings applySettings)
Apply a model to a record and return an output record with the provided
ApplySettings . |
void |
deactivate(String modelName)
De-activates the model with name
modelName by making it inactive. |
InputStream |
explainApplyModel(String modelName,
Record inputRecord)
Apply a model to a record and return the execution trace.
|
InputStream |
exportAnnotatedSource(String modelName)
Retrieve the annotated source of a model with name
modelName . |
InputStream |
exportModel(String modelName)
Retrieve the serialized representation of the model with name
modelName . |
InputStream |
exportSource(String modelName)
Retrieve the source of a model with name
modelName . |
Set<ModelInformation> |
getModelInformation()
Returns a
Set of ModelInformation s for all available models in the ADAPA store. |
ModelInformation |
getModelInformation(String modelName)
Get information about a model with name
modelName . |
Set<String> |
getModelNames()
Returns a
Set of all model names available in ADAPA store. |
ImportResultInformation |
importSource(String sourceName,
InputStream sourceStream)
Read a source (PMML) text and, if there are no error, import the contained models to ADAPA store.
|
ImportResultInformation |
importSource(String sourceName,
InputStream sourceStream,
boolean applyCleanser)
Read a source (PMML) text and, if there are no error, import the contained models to ADAPA store.
|
void |
removeModel(String modelName)
Remove a model from ADAPA store.
|
ImportResultInformation importSource(String sourceName, InputStream sourceStream)
sourceName
- the name of the source; it is used a the (base) name for models if the PMML file itself does not
contain model names.sourceStream
- the source InputStream
.ImportResultInformation importSource(String sourceName, InputStream sourceStream, boolean applyCleanser)
false
as the third argument. When
applyCleanser
is false
, the uploaded PMML is processed as is.sourceName
- the name of the source; it is used a the (base) name for models if the PMML file itself does not
contain model names.sourceStream
- the source InputStream
.applyCleanser
- boolean indicating if cleanser needs to be applied on the pmml (default is true
)InputStream exportSource(String modelName)
modelName
.modelName
- the name of the model.InputStream
containing the source.InputStream exportAnnotatedSource(String modelName)
modelName
.modelName
- the name of the model.InputStream
containing the source annotated with warnings and/or errors if any.InputStream exportModel(String modelName)
modelName
.modelName
- the name of the model.InputStream
containing the serialized representation of the model.void removeModel(String modelName)
modelName
- the name of the model to remove.Set<String> getModelNames()
Set
of all model names available in ADAPA store.ModelInformation getModelInformation(String modelName)
modelName
.modelName
- the name of the model for which to retrieve the information.null
if no such model exists.Set<ModelInformation> getModelInformation()
Set
of ModelInformation
s for all available models in the ADAPA store.OutputRecord applyModel(String modelName, Record inputRecord)
ApplySettings
.modelName
- the name of the model to apply.inputRecord
- the record to apply the model to.OutputRecord applyModel(String modelName, Record inputRecord, ApplySettings applySettings)
ApplySettings
.modelName
- the name of the model to apply.inputRecord
- the record to apply the model to.applySettings
- the ApplySettings
to use in applying the modelInputStream explainApplyModel(String modelName, Record inputRecord)
modelName
- the name of the model to apply.inputRecord
- the record to apply the model to.void activate(String modelName)
modelName
if it was inactive. Invoking activate(String)
method on an active model has no effect. After activation, a model is immediately available for handling data
processing requests. An active model consumes runtime resources, especially Heap.modelName
- the model namevoid deactivate(String modelName)
modelName
by making it inactive. After de-activation, the model is
still available, but it no longer consumes runtime resources, especially Heap. An inactive model can be made
active by invoking the activate(String)
method. Alternatively, if a data processing request comes in for
an inactive model, it is automatically made active. Invoking deactivate(String)
method on an inactive
model has not effect.modelName
- the model nameCopyright © 2005–2017 Zementis, Inc.. All rights reserved.