Class FeatureExtractor

java.lang.Object
neqsim.process.integration.ml.FeatureExtractor

public class FeatureExtractor extends Object
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 Details

    • STANDARD_STREAM_FEATURES

      public static final String[] STANDARD_STREAM_FEATURES
      Standard feature set for stream properties.
    • MINIMAL_STREAM_FEATURES

      public static final String[] MINIMAL_STREAM_FEATURES
      Minimal feature set for basic streams.
  • Constructor Details

    • FeatureExtractor

      private FeatureExtractor()
  • Method Details

    • extractStandardFeatures

      public static double[] extractStandardFeatures(StreamInterface stream)
      Extracts standard features from a stream.
      Parameters:
      stream - the stream to extract features from
      Returns:
      array of feature values in standard order
    • extractMinimalFeatures

      public static double[] extractMinimalFeatures(StreamInterface stream)
      Extracts minimal features from a stream.
      Parameters:
      stream - the stream to extract features from
      Returns:
      array of feature values in minimal order
    • extractFeatures

      public static double[] extractFeatures(StreamInterface stream, String[] featureNames)
      Extracts specified features from a stream.
      Parameters:
      stream - the stream to extract features from
      featureNames - names of features to extract
      Returns:
      array of feature values
    • extractFeature

      public static double extractFeature(StreamInterface stream, String featureName)
      Extracts a single feature from a stream.
      Parameters:
      stream - the stream
      featureName - the feature name
      Returns:
      feature value or NaN if not available
    • calculateGOR

      private static double calculateGOR(StreamInterface stream)
    • calculateWaterCut

      private static double calculateWaterCut(StreamInterface stream)
    • normalizeZScore

      public static double[] normalizeZScore(double[] features, double[] means, double[] stds)
      Normalizes features using z-score normalization.
      Parameters:
      features - raw features
      means - feature means
      stds - 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 features
      mins - feature minimums
      maxs - feature maximums
      Returns:
      normalized features (0-1 range)