report#
Note
This module is not intended to be used directly by users. It is used by the cleanlab.datalab.datalab module.
Specifically, it is used by the Datalab.report method.
Module that handles reporting of all types of issues identified in the data.
Classes:
|
Class that generates a report about the issues stored in a |
- class cleanlab.datalab.internal.report.Reporter(data_issues, task, verbosity=1, include_description=True, show_summary_score=False, show_all_issues=False, **kwargs)[source]#
Bases:
objectClass that generates a report about the issues stored in a
DataIssuesobject.- Parameters:
data_issues (
DataIssues) – TheDataIssuesobject containing the issues to report on. This is usually generated by theDatalabclass, stored in thedata_issuesattribute, and then passed to theReporterclass to generate a report.task (
Task) – Specific machine learning task that the datset is intended for. See details about supported tasks inTask.verbosity (
int) – The default verbosity of the report to generate. Each :py:class`IssueManager` specifies the available verbosity levels and what additional information is included at each level.include_description (
bool) – Whether to include the description of each issue type in the report. The description is included by default, but can be excluded by setting this parameter toFalse.
Note
This class is not intended to be used directly. Instead, use the Datalab.find_issues method which internally utilizes an IssueFinder instance.
Methods:
report(num_examples)Prints a report about identified issues in the data.
get_report(num_examples)Constructs a report about identified issues in the data.
- report(num_examples)[source]#
Prints a report about identified issues in the data.
- Parameters:
num_examples (
int) – The number of examples to include in the report for each issue type.- Return type:
None
- get_report(num_examples)[source]#
Constructs a report about identified issues in the data.
- Parameters:
num_examples (
int) – The number of examples to include in the report for each issue type.- Return type:
str- Returns:
report_str– A string containing the report.
Examples
>>> from cleanlab.datalab.internal.report import Reporter >>> reporter = Reporter(data_issues=data_issues, include_description=False) >>> report_str = reporter.get_report(num_examples=5) >>> print(report_str)