process_window
process_window ¤
ProcessWindowEvents ¤
ProcessWindowEvents(
dataframe: DataFrame,
signal_uuid: str,
*,
event_uuid: str = "eng:process_window",
value_column: str = "value_double",
time_column: str = "systime"
)
Bases: Base
Engineering: Process Window Analysis
Analyze time-windowed process statistics for shift reports, SPC context, and trend monitoring. Answers 'how is my process doing this hour/shift/day?'
Methods: - windowed_statistics: Per-window count, mean, std, min, max, percentiles. - detect_mean_shift: Flag windows where mean shifts significantly. - detect_variance_change: Flag windows where variance changes significantly. - window_comparison: Compare each window to overall baseline.
windowed_statistics ¤
windowed_statistics(window: str = '1h') -> pd.DataFrame
Per-window descriptive statistics.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, count, mean, std, |
DataFrame
|
min, max, median, p25, p75, range. |
detect_mean_shift ¤
detect_mean_shift(
window: str = "1h", sensitivity: float = 2.0
) -> pd.DataFrame
Flag windows where mean shifts significantly from the previous window.
A shift is detected when |current_mean - prev_mean| > sensitivity * prev_std.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: start, end, uuid, is_delta, |
DataFrame
|
prev_mean, current_mean, shift_sigma. |
detect_variance_change ¤
detect_variance_change(
window: str = "1h", ratio_threshold: float = 2.0
) -> pd.DataFrame
Flag windows where variance changes significantly.
A change is detected when (current_std / prev_std) > ratio_threshold or < (1 / ratio_threshold).
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: start, end, uuid, is_delta, |
DataFrame
|
prev_std, current_std, variance_ratio. |
window_comparison ¤
window_comparison(window: str = '1h') -> pd.DataFrame
Compare each window mean to the overall baseline.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, mean, z_score_vs_global, |
DataFrame
|
is_anomalous. |