Class PerformanceEvaluationExecutor
java.lang.Object
com.agenarisk.learning.structure.config.Configurer<PerformanceEvaluationExecutor>
com.agenarisk.learning.structure.config.PerformanceEvaluationExecutor
- All Implemented Interfaces:
Executable
,Loggable
public class PerformanceEvaluationExecutor
extends Configurer<PerformanceEvaluationExecutor>
implements Executable
- Author:
- Eugene Dementiev
-
Field Summary
Fields inherited from class com.agenarisk.learning.structure.config.Configurer
config
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
PerformanceEvaluationExecutor
(com.agenarisk.learning.structure.config.Config config) -
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateBrierScore
(String actualState, Map<String, Double> predictedDistribution) Calculates the Brier score for a single multiclass prediction.static double
calculateSphericalScore
(String actualState, Map<String, Double> predictedDistribution) Calculates the Spherical score for a single multiclass probabilistic prediction.void
execute()
void
setOriginalConfigurer
(PerformanceEvaluationConfigurer originalConfigurer) void
setStageIndex
(int stageIndex) Methods inherited from class com.agenarisk.learning.structure.config.Configurer
getConfig, setLoggingEnabled
-
Constructor Details
-
PerformanceEvaluationExecutor
protected PerformanceEvaluationExecutor(com.agenarisk.learning.structure.config.Config config) -
PerformanceEvaluationExecutor
protected PerformanceEvaluationExecutor()
-
-
Method Details
-
setOriginalConfigurer
-
execute
public void execute() throws com.agenarisk.learning.structure.exception.StructureLearningException- Specified by:
execute
in interfaceExecutable
- Throws:
com.agenarisk.learning.structure.exception.StructureLearningException
-
calculateBrierScore
public static double calculateBrierScore(String actualState, Map<String, Double> predictedDistribution) Calculates the Brier score for a single multiclass prediction.- Parameters:
actualState
- The true class label.predictedDistribution
- A map from class labels to predicted probabilities.- Returns:
- The Brier score for the prediction.
- Throws:
IllegalArgumentException
- if the predicted distribution does not sum to 1 (±0.01).
-
calculateSphericalScore
public static double calculateSphericalScore(String actualState, Map<String, Double> predictedDistribution) Calculates the Spherical score for a single multiclass probabilistic prediction.- Parameters:
actualState
- The true class label.predictedDistribution
- A map of class labels to predicted probabilities.- Returns:
- The Spherical score.
- Throws:
IllegalArgumentException
- if the predicted distribution does not contain the actual class.
-
setStageIndex
public void setStageIndex(int stageIndex)
-