glassbox.inspector.statistics¶
Statistical profiling and pairwise association analysis (Pearson, Cramér's V).
StatProfiler
¶
Calculates summary statistics for dataset columns.
calculate_numeric_stats
¶
Compute statistics for numerical columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dataset
|
The dataset containing the inputs. |
required |
cols
|
List[str]
|
List of column names to analyze. |
required |
Returns:
| Type | Description |
|---|---|
Dict
|
Mapping from column names to NumericStats objects. |
Source code in glassbox/inspector/statistics.py
calculate_categorical_stats
¶
Compute statistics for categorical columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dataset
|
The dataset containing the inputs. |
required |
cols
|
List[str]
|
List of column names to analyze. |
required |
Returns:
| Type | Description |
|---|---|
Dict
|
Mapping from column names to CategoricalStats objects. |
Source code in glassbox/inspector/statistics.py
AssociationAnalyzer
¶
Analyzes pairwise correlations and associations between features.
build_associations
¶
Compute pairwise correlation and associations across specified columns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dataset
|
Input dataset. |
required |
num_cols
|
List[str]
|
Numerical columns to inspect with Pearson. |
required |
cat_cols
|
List[str]
|
Categorical columns to inspect with Cramer's V. |
required |
Returns:
| Type | Description |
|---|---|
List
|
A list of CollinearityPair objects containing scores. |