evidently.tests

Available tests for TestSuite reports. Tests grouped into modules. For detailed information see module documentation.

Submodules

base_test module

class BaseCheckValueTest(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseConditionsTest

Base class for all tests with checking a value condition

Attributes:

value : Union[float, int]

Methods:

abstract calculate_value_for_test()

Method for getting the checking value. Define it in a child class

check()

get_condition()

abstract get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

groups()

class BaseConditionsTest(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: Test, ABC

Base class for all tests with a condition

Attributes:

condition : TestValueCondition

class GroupData(id: str, title: str, description: str, sort_index: int = 0, severity: Optional[str] = None)

Bases: object

Attributes:

description : str

id : str

severity : Optional[str] = None

sort_index : int = 0

title : str

class GroupTypeData(id: str, title: str, values: List[evidently.tests.base_test.GroupData] = )

Bases: object

Attributes:

id : str

title : str

values : List[GroupData]

Methods:

add_value(data: GroupData)

class GroupingTypes()

Bases: object

Attributes:

ByClass = GroupTypeData(id='by_class', title='By class', values=[])

ByFeature = GroupTypeData(id='by_feature', title='By feature', values=[GroupData(id='no group', title='Dataset-level tests', description='Some tests cannot be grouped by feature', sort_index=0, severity=None)])

TestGroup = GroupTypeData(id='test_group', title='By test group', values=[GroupData(id='no group', title='Ungrouped', description='Some tests don’t belong to any group under the selected condition', sort_index=0, severity=None), GroupData(id='classification', title='Classification', description='', sort_index=0, severity=None), GroupData(id='data_drift', title='Data Drift', description='', sort_index=0, severity=None), GroupData(id='data_integrity', title='Data Integrity', description='', sort_index=0, severity=None), GroupData(id='data_quality', title='Data Quality', description='', sort_index=0, severity=None), GroupData(id='regression', title='Regression', description='', sort_index=0, severity=None)])

TestType = GroupTypeData(id='test_type', title='By test type', values=[])

class Test()

Bases: object

all fields in test class with type that is subclass of Metric would be used as dependencies of test.

Attributes:

context = None

group : str

name : str

Methods:

abstract check()

get_result()

set_context(context)

class TestResult(name: str, description: str, status: str, groups: Dict[str, str] = )

Bases: object

Attributes:

ERROR = 'ERROR'

FAIL = 'FAIL'

SKIPPED = 'SKIPPED'

SUCCESS = 'SUCCESS'

WARNING = 'WARNING'

description : str

groups : Dict[str, str]

name : str

status : str

Methods:

is_passed()

mark_as_error(description: Optional[str] = None)

mark_as_fail(description: Optional[str] = None)

mark_as_success(description: Optional[str] = None)

mark_as_warning(description: Optional[str] = None)

set_status(status: str, description: Optional[str] = None)

class TestValueCondition(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: object

Class for processing a value conditions - should it be less, greater than, equals and so on.

An object of the class stores specified conditions and can be used for checking a value by them.

Attributes:

eq : Optional[Union[float, int]] = None

gt : Optional[Union[float, int]] = None

gte : Optional[Union[float, int]] = None

is_in : Optional[List[Union[float, int, str, bool]]] = None

lt : Optional[Union[float, int]] = None

lte : Optional[Union[float, int]] = None

not_eq : Optional[Union[float, int]] = None

not_in : Optional[List[Union[float, int, str, bool]]] = None

Methods:

as_dict()

check_value(value: Union[float, int])

has_condition()

Checks if we have a condition in the object and returns True in this case. If we have no conditions - returns False.

generate_column_tests(test_class: Type[Test], columns: Optional[Union[str, list]] = None, parameters: Optional[Dict] = None)

Function for generating tests for columns

classification_performance_tests module

class ByClassClassificationTest(label: str, probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

by_class_metric : ClassificationQualityByClass

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

group : str = 'classification'

metric : ClassificationQualityMetric

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

abstract get_value(result: dict)

class SimpleClassificationTest(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest

Attributes:

dummy_metric : ClassificationDummyMetric

group : str = 'classification'

metric : ClassificationQualityMetric

name : str

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

abstract get_value(result: DatasetClassificationQuality)

class SimpleClassificationTestTopK(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTest, ABC

Attributes:

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

probas_threshold : Optional[float]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

class TestAccuracyScore(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'Accuracy Score'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestAccuracyScoreRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestAccuracyScore)

render_json(obj: TestAccuracyScore)

class TestF1ByClass(label: str, probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: ByClassClassificationTest

Attributes:

name : str = 'F1 Score by Class'

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: dict)

class TestF1ByClassRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1ByClass)

render_json(obj: TestF1ByClass)

class TestF1Score(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'F1 Score'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestF1ScoreRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1Score)

render_json(obj: TestF1Score)

class TestFNR(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'False Negative Rate'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestFNRRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1Score)

render_json(obj: TestFNR)

class TestFPR(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'False Positive Rate'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestFPRRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1Score)

render_json(obj: TestFPR)

class TestLogLoss(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTest

Attributes:

condition : TestValueCondition

dummy_metric : ClassificationDummyMetric

metric : ClassificationQualityMetric

name : str = 'Logarithmic Loss'

value : Union[float, int]

Methods:

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestLogLossRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestLogLoss)

render_json(obj: TestLogLoss)

class TestPrecisionByClass(label: str, probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: ByClassClassificationTest

Attributes:

name : str = 'Precision Score by Class'

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: dict)

class TestPrecisionByClassRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestPrecisionByClass)

render_json(obj: TestPrecisionByClass)

class TestPrecisionScore(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'Precision Score'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestPrecisionScoreRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestPrecisionScore)

render_json(obj: TestPrecisionScore)

class TestRecallByClass(label: str, probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: ByClassClassificationTest

Attributes:

name : str = 'Recall Score by Class'

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: dict)

class TestRecallByClassRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestRecallByClass)

render_json(obj: TestRecallByClass)

class TestRecallScore(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'Recall Score'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestRecallScoreRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestRecallScore)

render_json(obj: TestRecallScore)

class TestRocAuc(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTest

Attributes:

name : str = 'ROC AUC Score'

roc_curve : ClassificationRocCurve

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestRocAucRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestRocAuc)

render_json(obj: TestRocAuc)

class TestTNR(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'True Negative Rate'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestTNRRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1Score)

render_json(obj: TestTNR)

class TestTPR(probas_threshold: Optional[float] = None, k: Optional[Union[float, int]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: SimpleClassificationTestTopK

Attributes:

condition : TestValueCondition

conf_matrix : ClassificationConfusionMatrix

dummy_metric : ClassificationDummyMetric

k : Optional[Union[float, int]]

metric : ClassificationQualityMetric

name : str = 'True Positive Rate'

probas_threshold : Optional[float]

value : Union[float, int]

Methods:

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

get_value(result: DatasetClassificationQuality)

class TestTPRRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestF1Score)

render_json(obj: TestTPR)

data_drift_tests module

class BaseDataDriftMetricsTest(columns: Optional[List[str]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, cat_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, num_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, per_column_stattest: Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None, stattest_threshold: Optional[float] = None, cat_stattest_threshold: Optional[float] = None, num_stattest_threshold: Optional[float] = None, per_column_stattest_threshold: Optional[Dict[str, float]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

group : str = 'data_drift'

metric : DataDriftTable

Methods:

check()

class TestAllFeaturesValueDrift(columns: Optional[List[str]] = None, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, cat_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, num_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, per_column_stattest: Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None, stattest_threshold: Optional[float] = None, cat_stattest_threshold: Optional[float] = None, num_stattest_threshold: Optional[float] = None, per_column_stattest_threshold: Optional[Dict[str, float]] = None)

Bases: BaseGenerator

Create value drift tests for numeric and category features

Attributes:

cat_stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]

cat_stattest_threshold : Optional[float]

columns : Optional[List[str]]

num_stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]

num_stattest_threshold : Optional[float]

per_column_stattest : Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]]

per_column_stattest_threshold : Optional[Dict[str, float]]

stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]

stattest_threshold : Optional[float]

Methods:

generate(columns_info: DatasetColumns)

class TestColumnDrift(column_name: str, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, stattest_threshold: Optional[float] = None)

Bases: Test

Attributes:

column_name : str

group : str = 'data_drift'

metric : ColumnDriftMetric

name : str = 'Drift per Column'

Methods:

check()

class TestColumnDriftRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnDrift)

render_json(obj: TestColumnDrift)

class TestCustomFeaturesValueDrift(features: List[str], stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, cat_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, num_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, per_column_stattest: Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None, stattest_threshold: Optional[float] = None, cat_stattest_threshold: Optional[float] = None, num_stattest_threshold: Optional[float] = None, per_column_stattest_threshold: Optional[Dict[str, float]] = None)

Bases: BaseGenerator

Create value drift tests for specified features

Attributes:

cat_stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None

cat_stattest_threshold : Optional[float] = None

features : List[str]

num_stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None

num_stattest_threshold : Optional[float] = None

per_column_stattest : Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None

per_column_stattest_threshold : Optional[Dict[str, float]] = None

stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None

stattest_threshold : Optional[float] = None

Methods:

generate(columns_info: DatasetColumns)

class TestDataDriftResult(name: str, description: str, status: str, groups: Dict[str, str] = , features: Dict[str, Tuple[str, float, float]] = )

Bases: TestResult

Attributes:

features : Dict[str, Tuple[str, float, float]]

class TestNumberOfDriftedColumns(columns: Optional[List[str]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, cat_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, num_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, per_column_stattest: Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None, stattest_threshold: Optional[float] = None, cat_stattest_threshold: Optional[float] = None, num_stattest_threshold: Optional[float] = None, per_column_stattest_threshold: Optional[Dict[str, float]] = None)

Bases: BaseDataDriftMetricsTest

Attributes:

condition : TestValueCondition

metric : DataDriftTable

name : str = 'Number of Drifted Features'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfDriftedColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfDriftedColumns)

render_json(obj: TestNumberOfDriftedColumns)

class TestShareOfDriftedColumns(columns: Optional[List[str]] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, cat_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, num_stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, per_column_stattest: Optional[Dict[str, Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]] = None, stattest_threshold: Optional[float] = None, cat_stattest_threshold: Optional[float] = None, num_stattest_threshold: Optional[float] = None, per_column_stattest_threshold: Optional[Dict[str, float]] = None)

Bases: BaseDataDriftMetricsTest

Attributes:

condition : TestValueCondition

metric : DataDriftTable

name : str = 'Share of Drifted Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfDriftedColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestShareOfDriftedColumns)

render_json(obj: TestShareOfDriftedColumns)

data_integrity_tests module

class BaseIntegrityByColumnsConditionTest(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

column_name : str

data_integrity_metric : ColumnSummaryMetric

group : str = 'data_integrity'

Methods:

groups()

class BaseIntegrityColumnMissingValuesTest(column_name: str, missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

column_name : str

group : str = 'data_integrity'

metric : DatasetMissingValuesMetric

class BaseIntegrityMissingValuesValuesTest(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

group : str = 'data_integrity'

metric : DatasetMissingValuesMetric

class BaseIntegrityOneColumnTest(column_name: str)

Bases: Test, ABC

Attributes:

column_name : str

group : str = 'data_integrity'

metric : ColumnSummaryMetric

Methods:

groups()

class BaseIntegrityValueTest(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

group : str = 'data_integrity'

metric : DatasetSummaryMetric

class BaseTestMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Common class for tests of missing values. Some tests have the same details visualizations.

Attributes:

MISSING_VALUES_NAMING_MAPPING = {None: 'Pandas nulls (None, NAN, etc.)', '': '"" (empty string)', inf: 'Numpy "inf" value', -inf: 'Numpy "-inf" value'}

color_options : ColorOptions

Methods:

get_table_with_missing_values_and_percents_by_column(info: TestHtmlInfo, metric_result: DatasetMissingValuesMetricResult, name: str)

Get a table with missing values number and percents

get_table_with_number_of_missing_values_by_one_missing_value(info: TestHtmlInfo, current_missing_values: dict, reference_missing_values: Optional[dict], name: str)

class TestAllColumnsShareOfMissingValues(columns: Optional[List[str]] = None)

Bases: BaseGenerator

Attributes:

columns : Optional[List[str]]

Methods:

generate(columns_info: DatasetColumns)

class TestColumnAllConstantValues(column_name: str)

Bases: BaseIntegrityOneColumnTest

Test that there is only one unique value in a column

Attributes:

metric : ColumnSummaryMetric

name : str = 'All Constant Values in a Column'

Methods:

check()

class TestColumnAllConstantValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnAllConstantValues)

class TestColumnAllUniqueValues(column_name: str)

Bases: BaseIntegrityOneColumnTest

Test that there is only uniques values in a column

Attributes:

column_name : str

metric : ColumnSummaryMetric

name : str = 'All Unique Values in a Column'

Methods:

check()

class TestColumnAllUniqueValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnAllUniqueValues)

class TestColumnNumberOfDifferentMissingValues(column_name: str, missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityColumnMissingValuesTest

Check a number of differently encoded missing values in one column.

Attributes:

column_name : str

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'Different Types of Missing Values in a Column'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnNumberOfDifferentMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnNumberOfDifferentMissingValues)

Get a table with a missing value and number of the value in the dataset

render_json(obj: TestColumnNumberOfDifferentMissingValues)

class TestColumnNumberOfMissingValues(column_name: str, missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityColumnMissingValuesTest

Check a number of missing values in one column.

Attributes:

column_name : str

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Number of Missing Values in a Column'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnNumberOfMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestColumnNumberOfMissingValues)

class TestColumnRegExp(column_name: str, reg_exp: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

column_name : str

group : str = 'data_integrity'

metric : ColumnRegExpMetric

name : str = 'RegExp Match'

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

groups()

class TestColumnRegExpRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnRegExp)

class TestColumnShareOfMissingValues(column_name: str, missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityColumnMissingValuesTest

Check a share of missing values in one column.

Attributes:

column_name : str

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Share of Missing Values in a Column'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnShareOfMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestColumnShareOfMissingValues)

class TestColumnsType(columns_type: Optional[dict] = None)

Bases: Test

This test compares columns type against the specified ones or a reference dataframe

class Result name: str, description: str, status: str, groups: Dict[str, str] = , columns_types: Dict[str, Tuple[str, str]] =

Bases: TestResult

Attributes:

columns_types : Dict[str, Tuple[str, str]]

check()

columns_type : Optional[dict]

group : str = 'data_integrity'

metric : DatasetSummaryMetric

name : str = 'Column Types'

class TestColumnsTypeRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnsType)

render_json(obj: TestColumnsType)

class TestNumberOfColumns(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

Number of all columns in the data, including utility columns (id/index, datetime, target, predictions)

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfColumns)

render_json(obj: TestNumberOfColumns)

class TestNumberOfColumnsWithMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a number of columns with a missing value.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Number of Columns With Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfColumnsWithMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfMissingValues)

render_json(obj: TestNumberOfColumnsWithMissingValues)

class TestNumberOfConstantColumns(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

Number of columns contained only one unique value

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Constant Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfConstantColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfConstantColumns)

render_json(obj: TestNumberOfConstantColumns)

class TestNumberOfDifferentMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a number of different encoded missing values.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'Different Types of Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfDifferentMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfDifferentMissingValues)

Get a table with a missing value and number of the value in the dataset

render_json(obj: TestNumberOfDifferentMissingValues)

class TestNumberOfDuplicatedColumns(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

How many columns have duplicates in the dataset

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Duplicate Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfDuplicatedColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestNumberOfDuplicatedColumns)

class TestNumberOfDuplicatedRows(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

How many rows have duplicates in the dataset

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Duplicate Rows'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfDuplicatedRowsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestNumberOfDuplicatedRows)

class TestNumberOfEmptyColumns(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

Number of columns contained all NAN values

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Empty Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfEmptyColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfEmptyColumns)

class TestNumberOfEmptyRows(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

Number of rows contained all NAN values

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Empty Rows'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a number of missing values.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Number of Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfMissingValues)

render_json(obj: TestNumberOfMissingValues)

class TestNumberOfRows(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityValueTest

Number of rows in the data

Attributes:

condition : TestValueCondition

metric : DatasetSummaryMetric

name : str = 'Number of Rows'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfRowsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestNumberOfRows)

class TestNumberOfRowsWithMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a number of rows with a missing value.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Number Of Rows With Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfRowsWithMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestNumberOfRowsWithMissingValues)

class TestShareOfColumnsWithMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a share of columns with a missing value.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Share of Columns With Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfColumnsWithMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfMissingValues)

render_json(obj: TestShareOfColumnsWithMissingValues)

class TestShareOfMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a share of missing values.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'Share of Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfMissingValues)

render_json(obj: TestShareOfMissingValues)

class TestShareOfRowsWithMissingValues(missing_values: Optional[list] = None, replace: bool = True, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseIntegrityMissingValuesValuesTest

Check a share of rows with a missing value.

Attributes:

condition : TestValueCondition

metric : DatasetMissingValuesMetric

name : str = 'The Share of Rows With Missing Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfRowsWithMissingValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: BaseTestMissingValuesRenderer

Attributes:

color_options : ColorOptions

Methods:

render_json(obj: TestShareOfRowsWithMissingValues)

data_quality_tests module

class BaseDataQualityCorrelationsMetricsValueTest(method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

group : str = 'data_quality'

method : str

metric : DatasetCorrelationsMetric

class BaseDataQualityMetricsValueTest(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

group : str = 'data_quality'

metric : ColumnSummaryMetric

class BaseDataQualityValueListMetricsTest(column_name: str, values: Optional[list] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

column_name : str

group : str = 'data_quality'

metric : ColumnValueListMetric

values : Optional[list]

Methods:

groups()

class BaseDataQualityValueRangeMetricsTest(column_name: str, left: Optional[float] = None, right: Optional[float] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

column : str

group : str = 'data_quality'

left : Optional[float]

metric : ColumnValueRangeMetric

right : Optional[float]

Methods:

groups()

class BaseFeatureDataQualityMetricsTest(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityMetricsValueTest, ABC

Attributes:

column_name : str

Methods:

check()

groups()

class TestAllColumnsMostCommonValueShare(columns: Optional[List[str]] = None)

Bases: BaseGenerator

Creates most common value share tests for each column in the dataset

Attributes:

columns : Optional[List[str]]

Methods:

generate(columns_info: DatasetColumns)

class TestCatColumnsOutOfListValues(columns: Optional[List[str]] = None)

Bases: BaseGenerator

Create share of out of list values tests for category columns

Attributes:

columns : Optional[List[str]]

Methods:

generate(columns_info: DatasetColumns)

class TestColumnQuantile(column_name: str, quantile: float, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest

Attributes:

column_name : str

group : str = 'data_quality'

metric : ColumnQuantileMetric

name : str = 'Quantile Value'

quantile : float

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

groups()

class TestColumnQuantileRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnQuantile)

class TestColumnValueMax(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Max Value'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnValueMaxRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnValueMax)

class TestColumnValueMean(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Mean Value'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnValueMeanRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnValueMean)

class TestColumnValueMedian(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Median Value'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnValueMedianRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnValueMedian)

class TestColumnValueMin(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Min Value'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnValueMinRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnValueMin)

class TestColumnValueStd(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Standard Deviation (SD)'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestColumnValueStdRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestColumnValueStd)

class TestConflictPrediction()

Bases: Test

Attributes:

group : str = 'data_quality'

metric : ConflictPredictionMetric

name : str = 'Test number of conflicts in prediction'

Methods:

check()

class TestConflictTarget()

Bases: Test

Attributes:

group : str = 'data_quality'

metric : ConflictTargetMetric

name : str = 'Test number of conflicts in target'

Methods:

check()

class TestCorrelationChanges(corr_diff: float = 0.25, method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityCorrelationsMetricsValueTest

Attributes:

corr_diff : float

group : str = 'data_quality'

metric : DatasetCorrelationsMetric

name : str = 'Change in Correlation'

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestCorrelationChangesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestCorrelationChanges)

class TestHighlyCorrelatedColumns(method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityCorrelationsMetricsValueTest

Attributes:

condition : TestValueCondition

method : str

metric : DatasetCorrelationsMetric

name : str = 'Highly Correlated Columns'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestHighlyCorrelatedColumnsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestHighlyCorrelatedColumns)

render_json(obj: TestHighlyCorrelatedColumns)

class TestMeanInNSigmas(column_name: str, n_sigmas: int = 2)

Bases: Test

Attributes:

column_name : str

group : str = 'data_quality'

metric : ColumnSummaryMetric

n_sigmas : int

name : str = 'Mean Value Stability'

Methods:

check()

class TestMeanInNSigmasRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestMeanInNSigmas)

render_json(obj: TestMeanInNSigmas)

class TestMostCommonValueShare(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Share of the Most Common Value'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestMostCommonValueShareRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestMostCommonValueShare)

render_json(obj: TestMostCommonValueShare)

class TestNumColumnsMeanInNSigmas(columns: Optional[List[str]] = None)

Bases: BaseGenerator

Create tests of mean for all numeric columns

Attributes:

columns : Optional[List[str]]

Methods:

generate(columns_info: DatasetColumns)

class TestNumColumnsOutOfRangeValues(columns: Optional[List[str]] = None)

Bases: BaseGenerator

Creates share of out of range values tests for all numeric columns

Attributes:

columns : Optional[List[str]]

Methods:

generate(columns_info: DatasetColumns)

class TestNumberOfOutListValues(column_name: str, values: Optional[list] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityValueListMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnValueListMetric

name : str = 'Number Out-of-List Values'

value : Union[float, int]

values : Optional[list]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfOutListValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfOutListValues)

class TestNumberOfOutRangeValues(column_name: str, left: Optional[float] = None, right: Optional[float] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityValueRangeMetricsTest

Attributes:

column : str

condition : TestValueCondition

left : Optional[float]

metric : ColumnValueRangeMetric

name : str = 'Number of Out-of-Range Values '

right : Optional[float]

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfOutRangeValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfOutRangeValues)

class TestNumberOfUniqueValues(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Number of Unique Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestNumberOfUniqueValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestNumberOfUniqueValues)

class TestPredictionFeaturesCorrelations(method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityCorrelationsMetricsValueTest

Attributes:

condition : TestValueCondition

method : str

metric : DatasetCorrelationsMetric

name : str = 'Correlation between Prediction and Features'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestPredictionFeaturesCorrelationsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestTargetFeaturesCorrelations)

render_json(obj: TestPredictionFeaturesCorrelations)

class TestShareOfOutListValues(column_name: str, values: Optional[list] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityValueListMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnValueListMetric

name : str = 'Share of Out-of-List Values'

value : Union[float, int]

values : Optional[list]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfOutListValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestShareOfOutListValues)

render_json(obj: TestShareOfOutListValues)

class TestShareOfOutRangeValues(column_name: str, left: Optional[float] = None, right: Optional[float] = None, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityValueRangeMetricsTest

Attributes:

column : str

condition : TestValueCondition

left : Optional[float]

metric : ColumnValueRangeMetric

name : str = 'Share of Out-of-Range Values'

right : Optional[float]

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestShareOfOutRangeValuesRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestShareOfOutRangeValues)

render_json(obj: TestShareOfOutRangeValues)

class TestTargetFeaturesCorrelations(method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityCorrelationsMetricsValueTest

Attributes:

condition : TestValueCondition

method : str

metric : DatasetCorrelationsMetric

name : str = 'Correlation between Target and Features'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestTargetFeaturesCorrelationsRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestTargetFeaturesCorrelations)

render_json(obj: TestTargetFeaturesCorrelations)

class TestTargetPredictionCorrelation(method: str = 'pearson', eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseDataQualityCorrelationsMetricsValueTest

Attributes:

condition : TestValueCondition

method : str

metric : DatasetCorrelationsMetric

name : str = 'Correlation between Target and Prediction'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestUniqueValuesShare(column_name: str, eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseFeatureDataQualityMetricsTest

Attributes:

column_name : str

condition : TestValueCondition

metric : ColumnSummaryMetric

name : str = 'Share of Unique Values'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestUniqueValuesShareRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestUniqueValuesShare)

class TestValueList(column_name: str, values: Optional[list] = None)

Bases: Test

Attributes:

column_name : str

group : str = 'data_quality'

metric : ColumnValueListMetric

name : str = 'Out-of-List Values'

values : Optional[list]

Methods:

check()

class TestValueListRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueList)

render_json(obj: TestValueList)

class TestValueRange(column_name: str, left: Optional[float] = None, right: Optional[float] = None)

Bases: Test

Attributes:

column : str

group : str = 'data_quality'

left : Optional[float]

metric : ColumnValueRangeMetric

name : str = 'Value Range'

right : Optional[float]

Methods:

check()

class TestValueRangeRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueRange)

regression_performance_tests module

class BaseRegressionPerformanceMetricsTest(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseCheckValueTest, ABC

Attributes:

dummy_metric : RegressionDummyMetric

group : str = 'regression'

metric : RegressionQualityMetric

class TestValueAbsMaxError(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'Max Absolute Error'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueAbsMaxErrorRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueAbsMaxError)

render_json(obj: TestValueAbsMaxError)

class TestValueMAE(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'Mean Absolute Error (MAE)'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueMAERenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueMAE)

render_json(obj: TestValueMAE)

class TestValueMAPE(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'Mean Absolute Percentage Error (MAPE)'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueMAPERenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueMAPE)

render_json(obj: TestValueMAPE)

class TestValueMeanError(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'Mean Error (ME)'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueMeanErrorRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueMeanError)

render_json(obj: TestValueMeanError)

class TestValueR2Score(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'R2 Score'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueR2ScoreRenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueR2Score)

render_json(obj: TestValueAbsMaxError)

class TestValueRMSE(eq: Optional[Union[float, int]] = None, gt: Optional[Union[float, int]] = None, gte: Optional[Union[float, int]] = None, is_in: Optional[List[Union[float, int, str, bool]]] = None, lt: Optional[Union[float, int]] = None, lte: Optional[Union[float, int]] = None, not_eq: Optional[Union[float, int]] = None, not_in: Optional[List[Union[float, int, str, bool]]] = None)

Bases: BaseRegressionPerformanceMetricsTest

Attributes:

condition : TestValueCondition

dummy_metric : RegressionDummyMetric

metric : RegressionQualityMetric

name : str = 'Root Mean Square Error (RMSE)'

value : Union[float, int]

Methods:

calculate_value_for_test()

Method for getting the checking value. Define it in a child class

get_condition()

get_description(value: Union[float, int])

Method for getting a description that we can use. The description can use the checked value. Define it in a child class

class TestValueRMSERenderer(color_options: Optional[ColorOptions] = None)

Bases: TestRenderer

Attributes:

color_options : ColorOptions

Methods:

render_html(obj: TestValueRMSE)

render_json(obj: TestValueRMSE)

utils module

approx(value, relative=None, absolute=None)

Get approximate value for checking a value is equal to other within some tolerance

dataframes_to_table(current: DataFrame, reference: Optional[DataFrame], columns: List[str], table_id: str, sort_by: str = 'curr', na_position: str = 'first', asc: bool = False)

plot_boxes(*, curr_for_plots: dict, ref_for_plots: Optional[dict], color_options: ColorOptions)

plot_check(fig, condition, color_options: ColorOptions)

plot_conf_mtrx(curr_mtrx, ref_mtrx)

plot_correlations(current_correlations, reference_correlations)

plot_dicts_to_table(dict_curr: dict, dict_ref: Optional[dict], columns: list, id_prfx: str, sort_by: str = 'curr', asc: bool = False)

plot_metric_value(fig, metric_val: float, metric_name: str)

plot_rates(*, curr_rate_plots_data: dict, ref_rate_plots_data: Optional[dict] = None, color_options: ColorOptions)

plot_roc_auc(*, curr_roc_curve: dict, ref_roc_curve: Optional[dict], color_options: ColorOptions)

plot_value_counts_tables(feature_name, values, curr_df, ref_df, id_prfx)

plot_value_counts_tables_ref_curr(feature_name, curr_df, ref_df, id_prfx)

regression_perf_plot(*, val_for_plot: Dict[str, Series], hist_for_plot: Dict[str, Series], name: str, curr_metric: float, ref_metric: Optional[float] = None, is_ref_data: bool = False, color_options: ColorOptions)

Last updated