rfwtools.extractor.autoregressive.autoregressive_extractor_faulted_cavity
- rfwtools.extractor.autoregressive.autoregressive_extractor_faulted_cavity(ex, normalize=True, max_lag=5, waveforms=None, query=None)[source]
Generates AR features for waveforms of the cavity labeled as faulted.
This function handles loading and unloading the Example’s data. No data after the fault is considered. Returns None if cavity_label is ‘0’ (Multi Cav tur off) since only a single cavity is to be considered.
- Note: these features have historically been used for visualizations as they are faster to computer and have a lower
dimensionality.
- Parameters:
ex (
Example) – The example for which we are generating featuresnormalize (
bool) – Should each waveform be normalized prior to autoregressive model fittingmax_lag (
int) – The number of AR parameters to fit (plus one for a bias/constant term)waveforms (
Optional[List[str]]) – The list of waveforms to model (e.g. [“GMES”, …]. If None a default (GMES, CASK, CRFP, DETA2) set is used. Note: the faulted cavity (cavity_label) is the only cavity used.query (
Optional[str]) – Argument passed to the ex.event_df to filter data prior to feature extraction, e.g. “Time <= 0”.
- Return type:
Optional[DataFrame]- Returns:
A DataFrame with a single row containing the feature set for the give example. None is returned if cavity_label is ‘0’ as no single responsible cavity is identified.