paddlets.analysis.base
- class Analyzer(**kwargs)[source]
Bases:
ABCAnalyzeris the base class for all analyzers. Analyzer module is designed to perform specific mathematical analysis on time series data. All analyzer need to override analyze method.- Parameters
kwargs – Argument positions left for sub-classes.
- abstract analyze(X: Union[Series, DataFrame], **kwargs) Any[source]
Analyze data, need to be implemented by sub-classes.
- Parameters
X (pd.Series|pd.DataFrame) – Pd.Series or pd.DataFrame to be analyzed.
kwargs – Argument positions left for override methods.
- Returns
Analysis results.
- Return type
Any
- Raises
ValueError –
- abstract get_properties() Dict[source]
Get the properties of the analyzer. All sub-classses should implements.
- Parameters
None –
- Returns
Dict
- Raises
None –
- plot() pyplot[source]
The plot method of the Analyzer to show figures of Analysis results, optionally override this method. If analyzers need to displays figures in the analysis report, this method needs to be overrided.
- Parameters
None –
- Returns
matplotlib.pyplot object
- Raises
None –
Examples
# Analysis results is DataFrame def plot(self): fig = self.res.plot().get_figure() return fig # Other #Implement the plot method by yourself, return need to be matplotlib.pyplot object.