Class MLIntegrationExamples.BaseMLAdapter
java.lang.Object
neqsim.process.safety.risk.ml.MLIntegrationExamples.BaseMLAdapter
- All Implemented Interfaces:
Serializable, MLIntegrationExamples.MLModelAdapter
- Direct Known Subclasses:
MLIntegrationExamples.OnnxAdapter, MLIntegrationExamples.RestApiAdapter, MLIntegrationExamples.TensorFlowAdapter, MLIntegrationExamples.ThresholdModel
- Enclosing class:
MLIntegrationExamples
public abstract static class MLIntegrationExamples.BaseMLAdapter
extends Object
implements MLIntegrationExamples.MLModelAdapter
Base adapter class with common functionality.
- Since:
- 3.3.0
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the expected input feature names.Gets the model name.booleanisLoaded()Checks if the model is loaded.protected float[]prepareInput(Map<String, Double> features) Prepares input array from feature map.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MLIntegrationExamples.MLModelAdapter
predict
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
modelName
-
inputFeatures
-
featureDefaults
-
isLoaded
protected boolean isLoaded
-
-
Constructor Details
-
BaseMLAdapter
Creates a base adapter.- Parameters:
modelName- model name
-
-
Method Details
-
getModelName
Description copied from interface:MLIntegrationExamples.MLModelAdapterGets the model name.- Specified by:
getModelNamein interfaceMLIntegrationExamples.MLModelAdapter- Returns:
- model name
-
getInputFeatures
Description copied from interface:MLIntegrationExamples.MLModelAdapterGets the expected input feature names.- Specified by:
getInputFeaturesin interfaceMLIntegrationExamples.MLModelAdapter- Returns:
- list of feature names
-
prepareInput
-
isLoaded
public boolean isLoaded()Checks if the model is loaded.- Returns:
- true if loaded
-