ModelDataQuality View
Experimental
The SageWorks View classes are currently in experimental mode so have fun but expect issues and API changes going forward.
MDQView Class: A View that computes various data_quality metrics
MDQView
MDQView Class: A View that computes various model data quality metrics
Common Usage
# Grab a FeatureSet and a Model
fs = FeatureSet("abalone_features")
model = Model("abalone-regression")
# Create a ModelDataQuality View
mdq_view = MDQView(fs).create(model=model, id_column="id")
my_df = mdq_view.pull_dataframe(head=True)
# Query the view
df = mdq_view.query(f"SELECT * FROM {mdq_view.table} where residuals > 0.5")
Source code in src/sageworks/core/views/mdq_view.py
14 15 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 |
|
__init__(artifact, source_table=None)
Initialize the ColumnSubsetView
Parameters:
Name | Type | Description | Default |
---|---|---|---|
artifact |
Union[DataSource, FeatureSet]
|
The DataSource or FeatureSet object |
required |
source_table |
str
|
The table/view to create the view from. Defaults to None |
None
|
Source code in src/sageworks/core/views/mdq_view.py
create(model, id_column)
Create a Model Data Quality View: A View that computes various model data quality metrics
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
Model
|
The Model object to use for the target and features |
required |
id_column |
str
|
The name of the id column (must be defined for join logic) |
required |
Returns:
Type | Description |
---|---|
Union[View, None]
|
Union[View, None]: The created View object (or None if failed to create the view) |
Source code in src/sageworks/core/views/mdq_view.py
Questions?
The SuperCowPowers team is happy to anser any questions you may have about AWS and SageWorks. Please contact us at sageworks@supercowpowers.com or on chat us up on Discord