Class Weighting
java.lang.Object
eu.qualimaster.easy.extension.internal.Weighting
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
public class Weighting
extends Object
implements net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
Weighting functions.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceA prediction processor.private static classImplements a maximum prediction processor, i.e., collects the maximum values of the predictions.private static classImplements an update processor calculating the weighted predictions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidprocessPredictions(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, Weighting.IPredictionProcessor processor) Processes predictions.weightAll(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting) Implements a weighting for mass predictions.weightAll(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, net.ssehub.easy.instantiation.core.model.vilTypes.Set<eu.qualimaster.observables.IObservable> costs) Implements a weighting for mass predictions.weightAllImpl(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, net.ssehub.easy.instantiation.core.model.vilTypes.Set<eu.qualimaster.observables.IObservable> costs) Implements a weighting of mass predictions.
-
Constructor Details
-
Weighting
public Weighting()
-
-
Method Details
-
weightAll
public static net.ssehub.easy.instantiation.core.model.vilTypes.Map<String,Double> weightAll(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting) Implements a weighting for mass predictions.- Parameters:
predictions- the predictions given as name-observable-prediction mapping, may be null, entries may be nullweighting- the weighting of the observables, negative weights invert the value by subtracting from the respective maximum- Returns:
- the "best" solution in terms of the name as maximum of weighted average sums
-
weightAll
public static net.ssehub.easy.instantiation.core.model.vilTypes.Map<String,Double> weightAll(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, net.ssehub.easy.instantiation.core.model.vilTypes.Set<eu.qualimaster.observables.IObservable> costs) Implements a weighting for mass predictions.- Parameters:
predictions- the predictions given as name-observable-prediction mapping, may be null, entries may be nullweighting- the weighting of the observables, negative weights invert the value by subtracting from the respective maximumcosts- the costs, i.e., observables to be counted negative- Returns:
- the "best" solution in terms of the name as maximum of weighted average sums
-
weightAllImpl
public static Map<String,Double> weightAllImpl(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, net.ssehub.easy.instantiation.core.model.vilTypes.Set<eu.qualimaster.observables.IObservable> costs) Implements a weighting of mass predictions.- Parameters:
predictions- the predictions given as name-observable-prediction mapping, may be null, entries may be nullweighting- the weighting of the observables, negative weights invert the value by subtracting from the respective maximumcosts- the costs, i.e., observables to be counted negative (may be null for no costs)- Returns:
- the "best" solution in terms of the name as the maximum the average weighted value if no
costs, the maximum weighted sum ifcosts
-
processPredictions
private static void processPredictions(net.ssehub.easy.instantiation.core.model.vilTypes.Map<String, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double>> predictions, net.ssehub.easy.instantiation.core.model.vilTypes.Map<eu.qualimaster.observables.IObservable, Double> weighting, Weighting.IPredictionProcessor processor) Processes predictions.- Parameters:
predictions- the predictionsweighting- the weighting, negative weights invert the value by subtracting from the respective maximumprocessor- the prediction processor
-