Class MLIntegrationExamples.ThresholdModel

java.lang.Object
neqsim.process.safety.risk.ml.MLIntegrationExamples.BaseMLAdapter
neqsim.process.safety.risk.ml.MLIntegrationExamples.ThresholdModel
All Implemented Interfaces:
Serializable, MLIntegrationExamples.MLModelAdapter
Enclosing class:
MLIntegrationExamples

public static class MLIntegrationExamples.ThresholdModel extends MLIntegrationExamples.BaseMLAdapter
Simple threshold-based model for testing and fallback.
Since:
3.3.0
Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

  • Constructor Details

    • ThresholdModel

      public ThresholdModel(String modelName)
      Creates a threshold model.
      Parameters:
      modelName - model name
  • Method Details

    • addThreshold

      public void addThreshold(String feature, double threshold, double weight)
      Adds a threshold rule.
      Parameters:
      feature - feature name
      threshold - threshold value
      weight - contribution weight when threshold exceeded
    • predict

      public double predict(Map<String,Double> features)
      Description copied from interface: MLIntegrationExamples.MLModelAdapter
      Predicts output from input features.
      Parameters:
      features - input features as name-value map
      Returns:
      prediction score or probability