Class AlgorithmPredictorImpl

java.lang.Object
eu.qualimaster.easy.extension.internal.AlgorithmPredictor
eu.qualimaster.easy.extension.internal.AlgorithmPredictorImpl

class AlgorithmPredictorImpl extends AlgorithmPredictor
Implements the algorithm (profile) predictor based on the Monitoring Layer (via synchronous event communication).
Author:
Holger Eichelberger
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private eu.qualimaster.events.SynchronousEventStore<eu.qualimaster.monitoring.events.AlgorithmProfilePredictionRequest,eu.qualimaster.monitoring.events.AlgorithmProfilePredictionResponse>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    algorithmPrediction(String pipeline, String pipelineElement, String algorithm, eu.qualimaster.observables.IObservable observable)
    Creates a request for predicting the characteristics for a given algorithm in the current target setting.
    algorithmPrediction(String pipeline, String pipelineElement, String algorithm, eu.qualimaster.observables.IObservable observable, Map<Object,Serializable> targetValues)
    Creates a request for predicting the characteristics for a given algorithm in a target setting.
    Map<String,Map<eu.qualimaster.observables.IObservable,Double>>
    algorithmPrediction(String pipeline, String pipelineElement, Set<String> algorithms, Set<eu.qualimaster.observables.IObservable> observables, Map<Object,Serializable> targetValues)
    Creates a mass-request to obtain the predictions for multiple algorithms/observables.
    algorithmPredictionEx(String pipeline, String pipelineElement, Set<String> algorithms, Set<eu.qualimaster.observables.IObservable> observables)
    Creates a request to obtain the prediction for multiple algorithms applicable in this in this situation (including varying parameters).
    Map<String,Map<eu.qualimaster.observables.IObservable,Double>>
    parameterPrediction(String pipeline, String pipelineElement, String parameter, Set<eu.qualimaster.observables.IObservable> observables, Map<Object,Serializable> targetValues)
    Creates a request to obtain the best algorithm in this situation.
    private eu.qualimaster.monitoring.events.AlgorithmProfilePredictionResponse
    waitFor(eu.qualimaster.monitoring.events.AlgorithmProfilePredictionRequest request)
    Waits for a response to the given request.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • store

      private eu.qualimaster.events.SynchronousEventStore<eu.qualimaster.monitoring.events.AlgorithmProfilePredictionRequest,eu.qualimaster.monitoring.events.AlgorithmProfilePredictionResponse> store
  • Constructor Details

    • AlgorithmPredictorImpl

      AlgorithmPredictorImpl()
  • Method Details

    • algorithmPrediction

      public Double algorithmPrediction(String pipeline, String pipelineElement, String algorithm, eu.qualimaster.observables.IObservable observable)
      Description copied from class: AlgorithmPredictor
      Creates a request for predicting the characteristics for a given algorithm in the current target setting.
      Overrides:
      algorithmPrediction in class AlgorithmPredictor
      Parameters:
      pipeline - the pipeline to predict for
      pipelineElement - the pipeline element
      algorithm - the algorithm (may be null for the actual one)
      observable - the observable to predict for
      Returns:
      the predicted value or null if there is no prediction
    • algorithmPrediction

      public Double algorithmPrediction(String pipeline, String pipelineElement, String algorithm, eu.qualimaster.observables.IObservable observable, Map<Object,Serializable> targetValues)
      Description copied from class: AlgorithmPredictor
      Creates a request for predicting the characteristics for a given algorithm in a target setting.
      Overrides:
      algorithmPrediction in class AlgorithmPredictor
      Parameters:
      pipeline - the pipeline to predict for
      pipelineElement - the pipeline element
      algorithm - the algorithm (may be null for the actual one)
      observable - the observable to predict for
      targetValues - the target values for a modified situation (may be null if just the algorithm may change based on the current situation)
      Returns:
      the predicted value or null if there is no prediction
    • algorithmPrediction

      public Map<String,Map<eu.qualimaster.observables.IObservable,Double>> algorithmPrediction(String pipeline, String pipelineElement, Set<String> algorithms, Set<eu.qualimaster.observables.IObservable> observables, Map<Object,Serializable> targetValues)
      Description copied from class: AlgorithmPredictor
      Creates a mass-request to obtain the predictions for multiple algorithms/observables.
      Overrides:
      algorithmPrediction in class AlgorithmPredictor
      Parameters:
      pipeline - the pipeline to predict for
      pipelineElement - the pipeline element
      algorithms - the algorithms to take into account
      observables - weighting the weighting
      targetValues - the target values for a modified situation (may be null if just the algorithm may change based on the current situation)
      Returns:
      the best algorithm or null if there is no prediction
    • parameterPrediction

      public Map<String,Map<eu.qualimaster.observables.IObservable,Double>> parameterPrediction(String pipeline, String pipelineElement, String parameter, Set<eu.qualimaster.observables.IObservable> observables, Map<Object,Serializable> targetValues)
      Creates a request to obtain the best algorithm in this situation.
      Overrides:
      parameterPrediction in class AlgorithmPredictor
      Parameters:
      pipeline - the pipeline to predict for
      pipelineElement - the pipeline element
      parameter - the parameter to predict for
      observables - the observables
      targetValues - the target values for a modified situation (may be null if just the algorithm may change based on the current situation)
      Returns:
      the predictions per algorithm/observables, if not possible individual predictions may be null or the entire result may be null if there is no prediction at all
    • algorithmPredictionEx

      public AlgorithmPredictionResult algorithmPredictionEx(String pipeline, String pipelineElement, Set<String> algorithms, Set<eu.qualimaster.observables.IObservable> observables)
      Creates a request to obtain the prediction for multiple algorithms applicable in this in this situation (including varying parameters).
      Overrides:
      algorithmPredictionEx in class AlgorithmPredictor
      Parameters:
      pipeline - the pipeline to predict for
      pipelineElement - the pipeline element
      algorithms - the algorithms to take into account
      observables - the observables
      Returns:
      the predictionsper algorithm/observables, if not possible individual predictions may be null or the entire result may be null if there is no prediction at all
    • waitFor

      private eu.qualimaster.monitoring.events.AlgorithmProfilePredictionResponse waitFor(eu.qualimaster.monitoring.events.AlgorithmProfilePredictionRequest request)
      Waits for a response to the given request.
      Parameters:
      request - the request
      Returns:
      the response (may be null if there was none within the predefined timeout)