Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.server.rtis.PredictionEngine
Interface PredictorInterface


public interface PredictorInterface

Used by ILS code to query Prediction Models.

Since:
1.0

Method Summary
 void flushLearningBuffer()
          Flushes learning buffers
 int getApplicationMappingId()
           
 void getExpectedValues(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, SDDoubleArray values)
          Returns predicted numeric values for a set of values of partitioning attributes specified by an output filter.
 void getExpectedValues(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, SDDoubleArray values, SDDoubleArray standardDeviations)
          Returns predicted numeric values and their standard deviations for a set of values of partitioning attributes specified by an output filter.
 void getLikelihoods(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, SDDoubleArray likelihoods, boolean relaxed)
          Returns predicted likelihoods for a set of values of target and partitioning attributes specified by an output filter.
 void getLikelihoods(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, SDDoubleArray likelihoods, SDDoubleArray standardDeviations, boolean relaxed)
          Returns predicted likelihoods for a set of values of target and partitioning attributes specified by an output filter.
 int getModelCount(ModelInterface model, ValueFilter[] outputFilter, ModelCount modelCount)
           
 float getModelError(ModelInterface model, ValueFilter[] outputFilter, ModelError modelError)
           
 float getModelLift(ModelInterface model, ValueFilter[] outputFilter, ModelLift modelLift)
           
 float getModelQuality(ModelInterface model, ValueFilter[] outputFilter)
           
 void getMostLikelyValues(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, int outputAttributeId, int n, SDStringArray values, SDDoubleArray likelihoods)
          Returns predicted most likely values of a given attribute.
 java.lang.String getStudyName()
           
 PredictionContribution[][] getWhy(ModelInterface model, InputProvider input, ValueFilter[] outputFilter, int topN)
          Returns a list of attribute values that contribute the most to the model score.
 void learn(ModelInterface[] models, InputProvider inputProvider, LearningRecordWriterFactoryInterface learningRecordWriterFactory, long msTimestamp)
          Supplies learning information to the Prediction Engine.
 void learn(ModelInterface[] models, InputProvider inputProvider, long msTimestamp)
          Supplies learning information to the Prediction Engine.
 void learn(ModelInterface[] models, InputProvider inputProvider, SessionInterface session, long msTimestamp)
          Supplies learning information to the Prediction Engine.
 void loadModels()
          Loads new models if available.
 ValueFilter[] makeExplicitFilter(ModelInterface model, ValueFilter[] filter)
          Creates an explicit representation of a filter by filling in missing values, numeric intervals and missing sub-filters.

 

Method Detail

getLikelihoods

void getLikelihoods(ModelInterface model,
                    InputProvider input,
                    ValueFilter[] outputFilter,
                    SDDoubleArray likelihoods,
                    boolean relaxed)
Returns predicted likelihoods for a set of values of target and partitioning attributes specified by an output filter.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
likelihoods - an array of predicted likelihoods.
relaxed - if this flag is true, then the model will return a likelihood prediction even if the prediction accuracy is very low. Otherwise, when prediction accuracy is low, the model will return Double.NaN.

getLikelihoods

void getLikelihoods(ModelInterface model,
                    InputProvider input,
                    ValueFilter[] outputFilter,
                    SDDoubleArray likelihoods,
                    SDDoubleArray standardDeviations,
                    boolean relaxed)
Returns predicted likelihoods for a set of values of target and partitioning attributes specified by an output filter.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
likelihoods - output an array of predicted likelihoods.
standardDeviations - output an array of estimated standard deviations of likelihoods.
relaxed - if this flag is true, then the model will return a likelihood prediction even if the prediction accuracy is very low. Otherwise, when prediction accuracy is low, the model will return Double.NaN.

getWhy

PredictionContribution[][] getWhy(ModelInterface model,
                                  InputProvider input,
                                  ValueFilter[] outputFilter,
                                  int topN)
Returns a list of attribute values that contribute the most to the model score.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
topN - number of top input score contributions to return.

getExpectedValues

void getExpectedValues(ModelInterface model,
                       InputProvider input,
                       ValueFilter[] outputFilter,
                       SDDoubleArray values)
Returns predicted numeric values for a set of values of partitioning attributes specified by an output filter.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
values - an array of predicted expected values.

getExpectedValues

void getExpectedValues(ModelInterface model,
                       InputProvider input,
                       ValueFilter[] outputFilter,
                       SDDoubleArray values,
                       SDDoubleArray standardDeviations)
Returns predicted numeric values and their standard deviations for a set of values of partitioning attributes specified by an output filter.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
values - an array of predicted expected values.
standardDeviations - an array of predicted standard deviations.

getMostLikelyValues

void getMostLikelyValues(ModelInterface model,
                         InputProvider input,
                         ValueFilter[] outputFilter,
                         int outputAttributeId,
                         int n,
                         SDStringArray values,
                         SDDoubleArray likelihoods)
Returns predicted most likely values of a given attribute.
Parameters:
model - a model object in the application.
input - an input provider object.
outputFilter - a filter specifying what predictions are requested.
outputAttributeId - ID of an attribute to return most likely values for.
n - a requested number of most likely values.
values - an array of returned most likely values.

makeExplicitFilter

ValueFilter[] makeExplicitFilter(ModelInterface model,
                                 ValueFilter[] filter)
Creates an explicit representation of a filter by filling in missing values, numeric intervals and missing sub-filters.
Parameters:
model - a model object in the application.
filter - a filter to make explicit. This object is not changed by the method.
Returns:
an explicit filter, possibly a reference to the argument filter object, if that filter is already explicit.

learn

void learn(ModelInterface[] models,
           InputProvider inputProvider,
           long msTimestamp)
Supplies learning information to the Prediction Engine.
Parameters:
models - an array of models that the learning applies to.
inputProvider - an input provider object responsible for providing values of input, partitioning and target attributes except the ones provided by the model object themselves.
msTimestamp - timestamp in milliseconds.
Since:
1.0

flushLearningBuffer

void flushLearningBuffer()
Flushes learning buffers

loadModels

void loadModels()
Loads new models if available. Waits until done.

getStudyName

java.lang.String getStudyName()

getApplicationMappingId

int getApplicationMappingId()

learn

void learn(ModelInterface[] models,
           InputProvider inputProvider,
           LearningRecordWriterFactoryInterface learningRecordWriterFactory,
           long msTimestamp)
Supplies learning information to the Prediction Engine.
Parameters:
models - an array of models that the learning applies to.
inputProvider - an input provider object responsible for providing values of input, partitioning and target attributes except the ones provided by the model object themselves.
learningRecordWriterFactory - used to write learning records either with autoFlush (for interactive sessions) or with manual flush (for batch sessions).
msTimestamp - timestamp in milliseconds.

learn

void learn(ModelInterface[] models,
           InputProvider inputProvider,
           SessionInterface session,
           long msTimestamp)
Supplies learning information to the Prediction Engine.

Called from generated code.

Parameters:
models - an array of models that the learning applies to.
inputProvider - an input provider object responsible for providing values of input, partitioning and target attributes except the ones provided by the model object themselves.
session - Contains a factory used to write learning records either directly to the learning table (for interactive sessions) or to the batch frameworks learning sandbox (for batch sessions).
msTimestamp - timestamp in milliseconds.

getModelCount

int getModelCount(ModelInterface model,
                  ValueFilter[] outputFilter,
                  ModelCount modelCount)
Returns:
counts in a model, a non-negative integer
See Also:
ChoiceModelInterface.getChoiceModelCount(ModelCount, String), ChoiceEventModelInterface.getChoiceEventModelCount(ModelCount, String, String)

getModelQuality

float getModelQuality(ModelInterface model,
                      ValueFilter[] outputFilter)
Returns:
quality for a model, a real number between 0 and 1 inclusive
See Also:
ChoiceModelInterface.getChoiceModelQuality(String), ChoiceEventModelInterface.getChoiceEventModelQuality(String, String)

getModelLift

float getModelLift(ModelInterface model,
                   ValueFilter[] outputFilter,
                   ModelLift modelLift)
Returns:
lift of a model, a real number of type float
See Also:
ChoiceModelInterface.getChoiceModelLift(ModelLift, String), ChoiceEventModelInterface.getChoiceEventModelLift(ModelLift, String, String)

getModelError

float getModelError(ModelInterface model,
                    ValueFilter[] outputFilter,
                    ModelError modelError)
Returns:
error of a model, a real number of type float
See Also:
ChoiceModelInterface.getChoiceModelError(ModelError, String), ChoiceEventModelInterface.getChoiceEventModelError(ModelError, String, String)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.