dqm_ml_core
DQM ML Core package for data quality metrics processing.
This package provides core components for computing data quality metrics on datasets using a streaming architecture. It includes base classes for metric processors and implementations for common metrics like completeness and representativeness.
Main components: - DatametricProcessor: Base class for all data quality metrics - CompletenessProcessor: Computes data completeness scores - RepresentativenessProcessor: Evaluates distribution representativeness - MetricRunner: Orchestrator for running metrics on DataFrames - PluginLoadedRegistry: Registry for dynamically loaded metric plugins
__all__ = ['CompletenessProcessor', 'DatametricProcessor', 'MetricRunner', 'PluginLoadedRegistry', 'RepresentativenessProcessor']
module-attribute
CompletenessProcessor
Bases: DatametricProcessor
Data completeness processor that evaluates the completeness of tabular data.
This processor calculates completeness scores (ratio of non-null to total values) for specified columns and provides overall dataset completeness metrics.
The processor operates at multiple levels: - Batch level: Aggregated counts for streaming processing - Dataset level: Final completeness scores and statistics
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
include_metadata: bool = bool(cfg.get('include_metadata', False))
instance-attribute
include_overall: bool = bool(cfg.get('include_overall', True))
instance-attribute
include_per_column: bool = bool(cfg.get('include_per_column', True))
instance-attribute
output_metrics = cfg.get('output_metrics', {})
instance-attribute
__init__(name: str = 'completeness', config: dict[str, Any] | None = None) -> None
Initialize the completeness processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the processor |
'completeness'
|
config
|
dict[str, Any] | None
|
Configuration dictionary containing: - input_columns: List of columns to analyze for completeness - output_metrics: Dictionary mapping metric names to output column names - include_per_column: Whether to include per-column completeness scores - include_overall: Whether to include overall completeness score |
None
|
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
compute(batch_metrics: dict[str, pa.Array] | None = None) -> dict[str, Any]
Compute final dataset-level completeness metrics.
This aggregates the batch-level counts to compute final completeness scores for each column and overall dataset completeness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch_metrics
|
dict[str, Array] | None
|
Dictionary of batch-level metrics to aggregate |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of final completeness metrics |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | |
compute_batch_metric(features: dict[str, pa.Array]) -> dict[str, pa.Array]
Compute batch-level completeness counts for streaming aggregation.
This counts total and non-null values per column in this batch, which will be aggregated across all batches for final dataset completeness.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
features
|
dict[str, Array]
|
Dictionary of column arrays from this batch |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary of batch-level completeness counts |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
compute_features(batch: pa.RecordBatch, prev_features: dict[str, pa.Array] | None = None) -> dict[str, pa.Array]
Extract the needed columns from the batch for completeness analysis.
This method simply passes through the columns we need to analyze, as completeness calculation is done at batch and dataset levels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch
|
RecordBatch
|
Input batch of data |
required |
prev_features
|
dict[str, Array] | None
|
Previous features (not used in this processor) |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary containing the columns to analyze |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
generated_metrics() -> list[str]
Return the list of metric columns that will be generated.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of output metric column names |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
reset() -> None
Reset processor state for new processing run.
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/completeness.py
233 234 | |
DatametricProcessor
Base class for all Data Quality metrics and feature extractors.
The processor follows a streaming lifecycle designed to handle large datasets without loading them entirely into memory:
- Feature Extraction (
compute_features): Transformation of raw data into relevant features (e.g., image -> luminosity). - Batch Aggregation (
compute_batch_metric): Compression of features into intermediate statistics (e.g., count, partial sum, histogram). - Global Computation (
compute): Final aggregation of all batch-level statistics into dataset-level scores.
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
config = config or {}
instance-attribute
input_columns = self.config['input_columns']
instance-attribute
name = name
instance-attribute
outputs_columns = self.config['output_columns']
instance-attribute
__init__(name: str, config: dict[str, Any] | None)
Initialize the dataset processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Unique name of the processor instance. |
required |
config
|
dict[str, Any] | None
|
Configuration dictionary (optional). |
required |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
compute(batch_metrics: dict[str, pa.Array]) -> dict[str, Any]
Perform the final dataset-level metric calculation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch_metrics
|
dict[str, Array]
|
The aggregated intermediate statistics from all batches. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing the final metrics. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
135 136 137 138 139 140 141 142 143 144 145 | |
compute_batch_metric(features: dict[str, pa.Array]) -> dict[str, pa.Array]
Aggregate features into intermediate statistics for the current batch.
This method is critical for scalability. It should return a compact representation of the data (e.g., partial sums) that can be efficiently combined later.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
features
|
dict[str, Array]
|
Dictionary of feature arrays computed on the batch. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
A dictionary of aggregated statistics. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
compute_delta(source: dict[str, Any], target: dict[str, Any]) -> dict[str, Any]
Compare metrics between two different dataselection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
dict[str, Any]
|
Final metrics from the source dataselection. |
required |
target
|
dict[str, Any]
|
Final metrics from the target dataselection. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing distance or difference scores. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
147 148 149 150 151 152 153 154 155 156 157 158 | |
compute_features(batch: pa.RecordBatch, prev_features: dict[str, pa.Array]) -> dict[str, pa.Array]
Transform a raw data batch into features.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch
|
RecordBatch
|
The input pyarrow RecordBatch. |
required |
prev_features
|
dict[str, Array]
|
Features already computed by preceding processors. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
A dictionary mapping feature names to pyarrow Arrays. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
generated_features() -> list[str]
Return the list of columns generated by this processor during feature extraction.
Returns:
| Type | Description |
|---|---|
list[str]
|
A list of feature names. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
72 73 74 75 76 77 78 79 80 81 | |
generated_metrics() -> list[str]
Return the names of the final metrics produced by this processor.
Returns:
| Type | Description |
|---|---|
list[str]
|
A list of metric names. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
83 84 85 86 87 88 89 90 91 92 | |
needed_columns() -> list[str]
Return the list of raw input columns required for feature extraction.
Returns:
| Type | Description |
|---|---|
list[str]
|
A list of column names. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/api/data_processor.py
63 64 65 66 67 68 69 70 | |
MetricRunner
Orchestrator for executing metric processors on in-memory Pandas DataFrames.
This class provides a high-level API for users who want to compute metrics directly on DataFrames without using the full YAML-driven pipeline.
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/metric_runner.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
config = config or {}
instance-attribute
__init__(config: dict[str, Any] | None = None) -> None
Initialize the runner.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any] | None
|
Optional configuration for metric default behaviors. |
None
|
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/metric_runner.py
26 27 28 29 30 31 32 33 | |
run(df: DataFrame, metrics_processors: list[DatametricProcessor]) -> dict[str, Any]
Execute the provided metric processors on a DataFrame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The input Pandas DataFrame. |
required |
metrics_processors
|
list[DatametricProcessor]
|
List of initialized DatametricProcessor instances. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary containing the aggregated dataset-level metrics. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/metric_runner.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
PluginLoadedRegistry
Singleton registry that provides lazy access to all registered DQM components.
Components include: - Metrics (DatametricProcessor) - DataLoaders - OutputWriters
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
get_dataloaders_registry() -> dict[str, Any]
classmethod
Return the registry of available data loaders.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary mapping data loader names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
79 80 81 82 83 84 85 86 87 88 | |
get_metrics_registry() -> dict[str, type[DatametricProcessor]]
classmethod
Return the registry of available metric processors.
Returns:
| Type | Description |
|---|---|
dict[str, type[DatametricProcessor]]
|
A dictionary mapping metric processor names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
67 68 69 70 71 72 73 74 75 76 77 | |
get_outputwriter_registry() -> dict[str, Any]
classmethod
Return the registry of available output writers.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary mapping output writer names to their classes. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/utils/registry.py
90 91 92 93 94 95 96 97 98 99 100 | |
RepresentativenessProcessor
Bases: DatametricProcessor
Evaluates how well the dataset represents a target statistical distribution.
This processor performs on samples discretisation statistical tests to compare the observed distribution of numerical columns against a theoretical target distribution (Normal or Uniform).
Supported Metrics
- Chi-square: Goodness-of-fit test for categorical/binned data.
- Kolmogorov-Smirnov (KS): Non-parametric test for continuous distributions (approximated via sampling).
- Shannon Entropy: Measures the information diversity of the binned data.
- GRTE (Geometric Representativeness Trajectory Error): Measures the exponential gap between observed and theoretical entropy.
The processor uses a streaming architecture: - Batch level: Computes partial calculus. - Dataset level: Aggregates histograms and performs final statistical tests.
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 | |
DEFAULT_ALPHA = 0.05
class-attribute
instance-attribute
DEFAULT_EPSILON = 1e-09
class-attribute
instance-attribute
DEFAULT_GRTE_THRESHOLD = 0.5
class-attribute
instance-attribute
DEFAULT_INTERPRETATION_THRESHOLDS = {'follows_distribution': 'follows_distribution', 'does_not_follow_distribution': 'does_not_follow_distribution', 'high_diversity': 'high_diversity', 'low_diversity': 'low_diversity', 'high_representativeness': 'high_representativeness', 'low_representativeness': 'low_representativeness'}
class-attribute
instance-attribute
DEFAULT_KS_MIN_SAMPLE_SIZE = 50
class-attribute
instance-attribute
DEFAULT_KS_SAMPLE_DIVISOR = 20
class-attribute
instance-attribute
DEFAULT_KS_SAMPLE_SIZE = 500
class-attribute
instance-attribute
DEFAULT_SHANNON_ENTROPY_THRESHOLD = 2.0
class-attribute
instance-attribute
SUPPORTED_DISTS = {'normal', 'uniform'}
class-attribute
instance-attribute
SUPPORTED_METRICS = {'chi-square', 'grte', 'shannon-entropy', 'kolmogorov-smirnov'}
class-attribute
instance-attribute
alpha: float = float(cfg.get('alpha', self.DEFAULT_ALPHA))
instance-attribute
bins: int = int(cfg.get('bins', 10))
instance-attribute
dist_params: dict[str, Any] = {}
instance-attribute
distribution: str = str(cfg.get('distribution', 'normal')).lower()
instance-attribute
epsilon: float = float(cfg.get('epsilon', self.DEFAULT_EPSILON))
instance-attribute
grte_threshold: float = float(cfg.get('grte_threshold', self.DEFAULT_GRTE_THRESHOLD))
instance-attribute
interpretation_thresholds: dict[str, str] = cfg.get('interpretation_thresholds', self.DEFAULT_INTERPRETATION_THRESHOLDS)
instance-attribute
ks_min_sample_size: int = int(cfg.get('ks_min_sample_size', self.DEFAULT_KS_MIN_SAMPLE_SIZE))
instance-attribute
ks_sample_divisor: int = int(cfg.get('ks_sample_divisor', self.DEFAULT_KS_SAMPLE_DIVISOR))
instance-attribute
ks_sample_size: int = int(cfg.get('ks_sample_size', self.DEFAULT_KS_SAMPLE_SIZE))
instance-attribute
metrics: list[str] = list(cfg.get('metrics', ['chi-square', 'grte', 'kolmogorov-smirnov', 'shannon-entropy']))
instance-attribute
name = name
instance-attribute
shannon_entropy_threshold: float = float(cfg.get('shannon_entropy_threshold', self.DEFAULT_SHANNON_ENTROPY_THRESHOLD))
instance-attribute
__init__(name: str = 'representativeness', config: dict[str, Any] | None = None) -> None
Initialize the representativeness processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Name of the processor. |
'representativeness'
|
config
|
dict[str, Any] | None
|
Configuration dictionary containing: - input_columns: List of columns to analyze. - metrics: List of metrics to compute (default: all supported). - bins: Number of bins for histograms (default: 10). - distribution: Target distribution ("normal" or "uniform"). - alpha: Significance level (default: 0.05). - distribution_params: Dictionary of params (e.g., mean, std, min, max). |
None
|
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
compute(batch_metrics: dict[str, pa.Array] | None = None) -> dict[str, Any]
Compute final dataset-level metrics by aggregating batch histograms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
batch_metrics
|
dict[str, Array] | None
|
Dictionary of batch-level metrics collected during processing. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary containing final scores and interpretations for all selected metrics. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | |
compute_batch_metric(features: dict[str, pa.Array]) -> dict[str, pa.Array]
Compute partial histogram statistics per batch for streaming aggregation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
features
|
dict[str, Array]
|
Dictionary of column arrays from this batch. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Array]
|
Dictionary containing: - {col}_count: Total valid numeric samples. - {col}_hist: Histogram counts. - {col}_ks_sample: Random subset of data for KS test. |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | |
generated_metrics() -> list[str]
Return the list of metric columns that will be generated.
Returns:
| Type | Description |
|---|---|
list[str]
|
List of output metric column names |
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
reset() -> None
Reset processor state for new processing run.
Source code in packages/dqm-ml-core/src/dqm_ml_core/metrics/representativeness.py
544 545 546 547 | |