ExDataCheck.DriftResult (ExDataCheck v0.2.1)

View Source

Result of drift detection analysis.

Contains information about distribution changes between baseline and current data.

Examples

iex> result = %ExDataCheck.DriftResult{
...>   drifted: true,
...>   columns_drifted: [:age, :income],
...>   drift_scores: %{age: 0.23, income: 0.45},
...>   method: :ks
...> }
iex> result.drifted
true

Summary

Types

t()

@type t() :: %ExDataCheck.DriftResult{
  columns_drifted: [atom() | String.t()],
  details: map(),
  drift_scores: %{optional(atom() | String.t()) => float()},
  drifted: boolean(),
  method: atom(),
  threshold: float()
}

Functions

new(drift_scores, threshold, method, details \\ %{})

@spec new(map(), float(), atom(), map()) :: t()

Creates a new DriftResult.

Parameters

  • drift_scores - Map of column names to drift scores
  • threshold - Drift threshold (scores above this indicate drift)
  • method - Detection method used (:ks, :chi_square, :psi)
  • details - Additional details (optional)