whylogs.core.constraints.factories.frequent_items#

Module Contents#

Functions#

frequent_strings_in_reference_set(...)

Determine whether a set of variables appear in the frequent strings for a string column.

n_most_common_items_in_set(...)

Validate if the top n most common items appear in the dataset.

whylogs.core.constraints.factories.frequent_items.frequent_strings_in_reference_set(column_name: str, reference_set: dict) whylogs.core.constraints.metric_constraints.MetricConstraint#

Determine whether a set of variables appear in the frequent strings for a string column. Every item in frequent strings must be in defined reference set

Parameters
  • column_name (str) – Columns the constraint is applied to.

  • reference_set (dict) – Reference set for applying the constraint

Return type

whylogs.core.constraints.metric_constraints.MetricConstraint

whylogs.core.constraints.factories.frequent_items.n_most_common_items_in_set(column_name: str, n: int, reference_set: dict) whylogs.core.constraints.metric_constraints.MetricConstraint#

Validate if the top n most common items appear in the dataset.

Parameters
  • column_name (str) – Columns the constraint is applied to.

  • n (int) – n most common items or strings.

  • reference_set (dict) – Reference set for applying the constraint

Return type

whylogs.core.constraints.metric_constraints.MetricConstraint