evidently.metrics.data_drift
Submodules
column_drift_metric module
class ColumnDriftMetric(column_name: str, stattest: Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]] = None, stattest_threshold: Optional[float] = None)
Bases: Metric
[ColumnDriftMetricResults
]
Calculate drift metric for a column
Attributes:
column_name : str
stattest : Optional[Union[str, Callable[[Series, Series, str, float], Tuple[float, bool]], StatTest]]
stattest_threshold : Optional[float]
Methods:
calculate(data: InputData)
get_parameters()
class ColumnDriftMetricRenderer(color_options: Optional[ColorOptions] = None)
Bases: MetricRenderer
Attributes:
color_options : ColorOptions
Methods:
render_html(obj: ColumnDriftMetric)
render_json(obj: ColumnDriftMetric)
class ColumnDriftMetricResults(column_name: str, column_type: str, stattest_name: str, stattest_threshold: float, drift_score: Union[float, int], drift_detected: bool, current_distribution: Distribution, reference_distribution: Distribution, current_scatter: Optional[Dict[str, list]], x_name: Optional[str], plot_shape: Optional[Dict[str, float]])
Bases: object
Attributes:
column_name : str
column_type : str
current_distribution : Distribution
current_scatter : Optional[Dict[str, list]]
drift_detected : bool
drift_score : Union[float, int]
plot_shape : Optional[Dict[str, float]]
reference_distribution : Distribution
stattest_name : str
stattest_threshold : float
x_name : Optional[str]
column_value_plot module
class ColumnValuePlot(column_name: str)
Bases: Metric
[ColumnValuePlotResults
]
Attributes:
column_name : str
Methods:
calculate(data: InputData)
class ColumnValuePlotRenderer(color_options: Optional[ColorOptions] = None)
Bases: MetricRenderer
Attributes:
color_options : ColorOptions
Methods:
render_html(obj: ColumnValuePlot)
render_json(obj: ColumnValuePlot)
class ColumnValuePlotResults(column_name: str, datetime_column_name: Optional[str], current_scatter: pandas.core.frame.DataFrame, reference_scatter: pandas.core.frame.DataFrame)
Bases: object
Attributes:
column_name : str
current_scatter : DataFrame
datetime_column_name : Optional[str]
reference_scatter : DataFrame
data_drift_table module
class DataDriftTable(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: Metric
[DataDriftTableResults
]
Attributes:
columns : Optional[List[str]]
options : DataDriftOptions
Methods:
calculate(data: InputData)
get_parameters()
class DataDriftTableRenderer(color_options: Optional[ColorOptions] = None)
Bases: MetricRenderer
Attributes:
color_options : ColorOptions
Methods:
render_html(obj: DataDriftTable)
render_json(obj: DataDriftTable)
class DataDriftTableResults(number_of_columns: int, number_of_drifted_columns: int, share_of_drifted_columns: float, dataset_drift: bool, drift_by_columns: Dict[str, ColumnDataDriftMetrics], dataset_columns: DatasetColumns)
Bases: object
Attributes:
dataset_columns : DatasetColumns
dataset_drift : bool
drift_by_columns : Dict[str, ColumnDataDriftMetrics]
number_of_columns : int
number_of_drifted_columns : int
share_of_drifted_columns : float
dataset_drift_metric module
class DataDriftMetricsRenderer(color_options: Optional[ColorOptions] = None)
Bases: MetricRenderer
Attributes:
color_options : ColorOptions
Methods:
render_html(obj: DatasetDriftMetric)
render_json(obj: DatasetDriftMetric)
class DatasetDriftMetric(columns: Optional[List[str]] = None, drift_share: float = 0.5, 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: Metric
[DatasetDriftMetricResults
]
Attributes:
columns : Optional[List[str]]
drift_share : float
options : DataDriftOptions
Methods:
calculate(data: InputData)
get_parameters()
class DatasetDriftMetricResults(drift_share: float, number_of_columns: int, number_of_drifted_columns: int, share_of_drifted_columns: float, dataset_drift: bool)
Bases: object
Attributes:
dataset_drift : bool
drift_share : float
number_of_columns : int
number_of_drifted_columns : int
share_of_drifted_columns : float
target_by_features_table module
class TargetByFeaturesTable(columns: Optional[List[str]] = None)
Bases: Metric
[TargetByFeaturesTableResults
]
Attributes:
columns : Optional[List[str]]
Methods:
calculate(data: InputData)
class TargetByFeaturesTableRenderer(color_options: Optional[ColorOptions] = None)
Bases: MetricRenderer
Attributes:
color_options : ColorOptions
Methods:
render_html(obj: TargetByFeaturesTable)
render_json(obj: TargetByFeaturesTable)
class TargetByFeaturesTableResults(current_plot_data: pandas.core.frame.DataFrame, reference_plot_data: pandas.core.frame.DataFrame, target_name: Optional[str], curr_predictions: Optional[PredictionData], ref_predictions: Optional[PredictionData], columns: List[str], task: str)
Bases: object
Attributes:
columns : List[str]
curr_predictions : Optional[PredictionData]
current_plot_data : DataFrame
ref_predictions : Optional[PredictionData]
reference_plot_data : DataFrame
target_name : Optional[str]
task : str
Last updated