paddlets.analysis.time_domain
- class Seasonality(period: Union[None, int] = None, nlags: int = 300, alpha: float = 0.05, mode: str = 'additive', order: int = 1, **kwargs)[source]
Bases:
AnalyzerCompute the seasonality period of given columns.
- Parameters
period (int) – The period of the data. If None(by default), we will calculate a unique seasonality period.
nlags (int) – Number of lags to return autocorrelation for, default=300.
alpha (float) – The confidence intervals for the seasonality. default=0.05.
mode (str) – Type of seasonal component. Abbreviations are accepted. Optional(“additive”, “multiplicative”).
order (int) – How many points on each side to use for the comparisont o consider
comparator(n, n+x)to be True.kwargs – Other parameters.
- analyze(X: Union[Series, DataFrame]) Union[Any, Series][source]
Compute the seasonality period of given columns
- Parameters
X (pd.Series|pd.DataFrame) – columns to be analyzed
- Returns
The seasonality period and seasonality values
- Return type
(dict, dict)
- Raises
ValueError –
- class Acf(nlags: int = 300, alpha: float = 0.05, **kwargs)[source]
Bases:
AnalyzerCompute the acf values of given columns.
- Parameters
nlags (int) – Number of lags to return autocorrelation for, default=300.
alpha (float) – The confidence intervals for the acf. default=0.05.
kwargs – Other parameters.
- analyze(X: Union[Series, DataFrame]) Union[Any, Series][source]
Compute the acf values of given columns
- Parameters
X (pd.Series|pd.DataFrame) – columns to be analyzed
- Returns
The acf values and confident values
- Return type
dict
- Raises
ValueError –
- class Correlation(method: str = 'pearson', lag: int = 0, lag_cols: Optional[Union[str, List[str]]] = [], **kwargs)[source]
Bases:
AnalyzerCompute the correlation values of given columns.
- Parameters
method (str) – {‘pearson’, ‘kendall’, ‘spearman’} or callable
lag (int) – lag time points.
lag_cols (List[str], str) – columns that need lag.
kwargs – Other parameters.
- analyze(X: DataFrame) Union[Any, Series][source]
Compute the correlation values of given columns.
- Parameters
X (pd.DataFrame) – columns to be analyzed
- Returns
The acf values and confident values
- Return type
dict
- Raises
ValueError –