Periodic Feature Network

This page documents the periodic-feature neural model that expands the angle input into explicit sine and cosine harmonics before applying a feedforward backbone.

Periodic-feature neural network for TE regression with angle expansion.

class scripts.models.periodic_feature_network.PeriodicFeatureNetwork(input_size, hidden_size, output_size=1, activation_name='GELU', dropout_probability=0.10, use_layer_norm=True, harmonic_order=8, include_raw_angle_feature=True)[source]

Feedforward TE model with explicit periodic angle features.

Parameters:
  • input_size (int)

  • hidden_size (list[int])

  • output_size (int)

  • activation_name (str)

  • dropout_probability (float)

  • use_layer_norm (bool)

  • harmonic_order (int)

  • include_raw_angle_feature (bool)

__init__(input_size, hidden_size, output_size=1, activation_name='GELU', dropout_probability=0.10, use_layer_norm=True, harmonic_order=8, include_raw_angle_feature=True)[source]

Initialize the periodic-feature TE model.

Parameters:
  • input_size (int) – Total input feature count including angular position and operating-condition features.

  • hidden_size (list[int]) – Hidden-layer widths passed to the feedforward backbone.

  • output_size (int) – Regression target count.

  • activation_name (str) – Backbone activation function name.

  • dropout_probability (float) – Backbone dropout probability.

  • use_layer_norm (bool) – Whether the backbone uses layer normalization.

  • harmonic_order (int) – Highest harmonic order used in the periodic feature expansion.

  • include_raw_angle_feature (bool) – Whether to preserve the normalized raw angle alongside the sine/cosine expansion.

Return type:

None

build_periodic_feature_tensor(angular_position_deg)[source]

Build the sine/cosine periodic expansion of the angle feature.

Parameters:

angular_position_deg (Tensor) – Angular position tensor in degrees with shape (batch_size, 1).

Returns:

Concatenated sine and cosine feature tensor for all configured harmonic orders.

Return type:

torch.Tensor

forward_with_input_context(input_tensor, normalized_input_tensor)[source]

Predict TE from periodic angle features and normalized conditions.

Parameters:
  • input_tensor (Tensor) – Raw input tensor whose first column is the physical angular position in degrees.

  • normalized_input_tensor (Tensor) – Normalized input tensor used by the feedforward backbone.

Returns:

Scalar TE prediction tensor with shape (batch_size, output_size).

Return type:

torch.Tensor