rfwtools.extractor.autoregressive.autoregressive_extractor

rfwtools.extractor.autoregressive.autoregressive_extractor(ex, normalize=True, max_lag=5, signals=None, query=None)[source]

Uses statsmodels to generate autoregressive model of each waveform. AR coefficients are returned as features.

This function handles loading and unloading the Example’s data.

Note: these features have historically been used for both cavity and fault type model training.

Parameters:
  • ex (Example) – The example for which we are generating features

  • normalize (bool) – Should each waveform be normalized prior to autoregressive model fitting

  • max_lag (int) – The number of AR parameters to fit (plus one for a bias/constant term)

  • signals (Optional[List[str]]) –

    The list of signals to model (e.g. [“1_GMES”, …]. If None a default (1-8, GMES, CASK, CRFP, DETA2) set is

    used.

  • query (Optional[str]) – Argument passed to the ex.event_df to filter data prior to feature extraction, e.g. “Time <= 0”.

Return type:

DataFrame

Returns:

A DataFrame with a single row containing the feature set for the give example.