Class FeatureExtractor
java.lang.Object
neqsim.process.integration.ml.FeatureExtractor
Utility class for extracting ML features from NeqSim process streams.
Provides standardized feature extraction for hybrid physics-ML models, ensuring consistent input formatting for external ML platforms.
- Version:
- 1.0
- Author:
- ESOL
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static doublecalculateGOR(StreamInterface stream) private static doublecalculateWaterCut(StreamInterface stream) static doubleextractFeature(StreamInterface stream, String featureName) Extracts a single feature from a stream.static double[]extractFeatures(StreamInterface stream, String[] featureNames) Extracts specified features from a stream.static double[]Extracts minimal features from a stream.static double[]Extracts standard features from a stream.static double[]normalizeMinMax(double[] features, double[] mins, double[] maxs) Normalizes features using min-max normalization.static double[]normalizeZScore(double[] features, double[] means, double[] stds) Normalizes features using z-score normalization.
-
Field Details
-
STANDARD_STREAM_FEATURES
Standard feature set for stream properties. -
MINIMAL_STREAM_FEATURES
Minimal feature set for basic streams.
-
-
Constructor Details
-
FeatureExtractor
private FeatureExtractor()
-
-
Method Details
-
extractStandardFeatures
Extracts standard features from a stream.- Parameters:
stream- the stream to extract features from- Returns:
- array of feature values in standard order
-
extractMinimalFeatures
Extracts minimal features from a stream.- Parameters:
stream- the stream to extract features from- Returns:
- array of feature values in minimal order
-
extractFeatures
Extracts specified features from a stream.- Parameters:
stream- the stream to extract features fromfeatureNames- names of features to extract- Returns:
- array of feature values
-
extractFeature
Extracts a single feature from a stream.- Parameters:
stream- the streamfeatureName- the feature name- Returns:
- feature value or NaN if not available
-
calculateGOR
-
calculateWaterCut
-
normalizeZScore
public static double[] normalizeZScore(double[] features, double[] means, double[] stds) Normalizes features using z-score normalization.- Parameters:
features- raw featuresmeans- feature meansstds- feature standard deviations- Returns:
- normalized features
-
normalizeMinMax
public static double[] normalizeMinMax(double[] features, double[] mins, double[] maxs) Normalizes features using min-max normalization.- Parameters:
features- raw featuresmins- feature minimumsmaxs- feature maximums- Returns:
- normalized features (0-1 range)
-