Class RiskMLInterface
java.lang.Object
neqsim.process.safety.risk.ml.RiskMLInterface
- All Implemented Interfaces:
Serializable
Machine Learning Integration Interface for Risk Assessment.
Provides a standardized interface for integrating external machine learning models with the NeqSim risk framework. Supports various ML use cases including:
- Failure prediction models
- Anomaly detection
- Remaining useful life (RUL) prediction
- Process optimization under risk constraints
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFeature extractor for process data.static classMachine learning model wrapper.static classML prediction result.static interfaceFunctional interface for ML model prediction.static classModel performance metrics.static classPrediction record for history tracking. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String, RiskMLInterface.FeatureExtractor> Feature extractors.private intMaximum history size.private Map<String, RiskMLInterface.MLModel> Registered ML models.private StringInterface name.private List<RiskMLInterface.PredictionRecord> Prediction history.private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateAnomalyDetectionModel(String modelId, String modelName) Creates and registers an anomaly detection model.createFailurePredictionModel(String modelId, String modelName) Creates and registers a failure prediction model.createRULModel(String modelId, String modelName) Creates and registers an RUL prediction model.getModelPerformance(String modelId) Gets model performance metrics.getName()Makes a prediction using a registered model.Makes a prediction with feature extraction.voidprovideFeedback(Instant predictionTimestamp, double actualValue) Provides feedback on a prediction (for model improvement).voidregisterFeatureExtractor(String name, RiskMLInterface.FeatureExtractor extractor) Registers a feature extractor.voidRegisters an ML model.toJson()Converts to JSON string.toMap()Converts to map for JSON serialization.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
Interface name. -
models
Registered ML models. -
featureExtractors
Feature extractors. -
predictionHistory
Prediction history. -
maxHistorySize
private int maxHistorySizeMaximum history size.
-
-
Constructor Details
-
RiskMLInterface
-
-
Method Details
-
registerModel
Registers an ML model.- Parameters:
model- ML model
-
createFailurePredictionModel
Creates and registers a failure prediction model.- Parameters:
modelId- model IDmodelName- model name- Returns:
- created model
-
createAnomalyDetectionModel
Creates and registers an anomaly detection model.- Parameters:
modelId- model IDmodelName- model name- Returns:
- created model
-
createRULModel
Creates and registers an RUL prediction model.- Parameters:
modelId- model IDmodelName- model name- Returns:
- created model
-
registerFeatureExtractor
Registers a feature extractor.- Parameters:
name- extractor nameextractor- feature extractor
-
predict
Makes a prediction using a registered model.- Parameters:
modelId- model IDfeatures- input features- Returns:
- prediction result
-
predictWithExtraction
-
provideFeedback
Provides feedback on a prediction (for model improvement).- Parameters:
predictionTimestamp- timestamp of predictionactualValue- actual observed value
-
getModelPerformance
Gets model performance metrics.- Parameters:
modelId- model ID- Returns:
- performance metrics
-
getName
-
getModel
-
getModels
-
getActiveModels
-
toMap
-
toJson
-
toString
-