paddlets.analysis.analysis_report
- class AnalysisReport(dataset: TSDataset, names: Optional[Union[str, List[str]]] = None, params: Optional[Dict] = None, columns: Optional[Union[str, List[str]]] = None)[source]
Bases:
objectAggregate the results of analyzers, show them in format of tables and charts in reports. Currently supprt docx and json Analysis report.
- Parameters
dataset[TSDataset] – TSDataset to be analyzed
names[str|List[str]] – Analyzer names, set to DEFAULT_ANALYZERS by default
params[Dict] – analyzers params
columns[str|List[str]] – columns to be analyzed
Examples
# example for names. names = ["max", "outlier"] # example for params: params = { "max":{ "param1":1 }, "outlier":{ "param1":1, "param2":2 }}
- export_docx_report(path: str = '.', file_name: str = 'analysis_report.docx') None[source]
Export a report in the docx format
- Parameters
path[str] – path to save the exported report, set to the current path by default
file_name[str] – file name ,default set to “analysis_report.pdf”
- Returns
None
- export_json_report(log: bool = True) Dict[source]
Export a report in the Json format
- Parameters
log[bool] – print log or not, default set to True
- Returns
Dict
- get_all_analyzers_names(log: bool = True) List[str][source]
Get the names of analyzers This method can be called internally or externally, and the parameter log is set to False or True accordingly.
- Parameters
log (bool) – Whether to print the log, the default is True when used externally, and set to False when called internally
- Returns
List[str]