process_stability_index
process_stability_index ¤
ProcessStabilityIndex ¤
ProcessStabilityIndex(
dataframe: DataFrame,
signal_uuid: str,
*,
target: Optional[float] = None,
lower_spec: Optional[float] = None,
upper_spec: Optional[float] = None,
event_uuid: str = "eng:stability_index",
value_column: str = "value_double",
time_column: str = "systime"
)
Bases: Base
Engineering: Process Stability Index
Generate a single 0-100 stability score per shift/day for a signal. Answers 'is my process running well today?' with one number.
Methods: - stability_score: Composite 0-100 score per window. - score_trend: Is stability improving or degrading? - worst_periods: N worst-scoring windows. - stability_comparison: Compare each window to best-observed.
stability_score ¤
stability_score(window: str = '8h') -> pd.DataFrame
Composite 0-100 stability score per window.
Four sub-scores (each 0-25): - variance_score: low std = high score - bias_score: on-target = high score - excursion_score: in-spec = high score - smoothness_score: low point-to-point jitter = high score
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, stability_score, |
DataFrame
|
variance_score, bias_score, excursion_score, smoothness_score, |
DataFrame
|
grade. |
score_trend ¤
score_trend(
window: str = "8h", n_windows: int = 7
) -> pd.DataFrame
Track whether stability is improving or degrading.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, stability_score, |
DataFrame
|
rolling_avg, trend_direction, score_change. |
worst_periods ¤
worst_periods(
window: str = "1h", n: int = 5
) -> pd.DataFrame
Return the N worst-scoring windows.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, stability_score, |
DataFrame
|
variance_score, bias_score, excursion_score, smoothness_score, |
DataFrame
|
primary_issue. |
stability_comparison ¤
stability_comparison(window: str = '8h') -> pd.DataFrame
Compare each window to the best-observed window.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns: window_start, stability_score, |
DataFrame
|
best_score, gap_to_best, pct_of_best. |