Model Utilities
Examples
Examples of using the Model Utilities are listed at the bottom of this page Examples.
Model Utilities for Workbench models
instance_architecture(instance_name)
Get the architecture for the given instance name
load_category_mappings_from_s3(model_artifact_uri)
Download and extract category mappings from a model artifact in S3.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_artifact_uri
|
str
|
S3 URI of the model artifact. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
Optional[dict]
|
The loaded category mappings or None if not found. |
Source code in src/workbench/utils/model_utils.py
model_instance_info()
Get the instance information for the Model
Source code in src/workbench/utils/model_utils.py
proximity_model(model, prox_model_name, track_columns=None)
Create a proximity model based on the given model
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
Model
|
The model to create the proximity model from |
required |
prox_model_name
|
str
|
The name of the proximity model to create |
required |
track_columns
|
list
|
List of columns to track in the proximity model |
None
|
Returns: Model: The proximity model
Source code in src/workbench/utils/model_utils.py
supported_instance_types(arch='x86_64')
Get the supported instance types for the Model/Model
Source code in src/workbench/utils/model_utils.py
Examples
Feature Importance
"""Example for using some Model Utilities"""
from workbench.utils.model_utils import feature_importance
model = Model("aqsol_classification")
feature_importance(model)
Output
[('mollogp', 469.0),
('minabsestateindex', 277.0),
('peoe_vsa8', 237.0),
('qed', 237.0),
('fpdensitymorgan1', 230.0),
('fpdensitymorgan3', 221.0),
('estate_vsa4', 220.0),
('bcut2d_logphi', 218.0),
('vsa_estate5', 218.0),
('vsa_estate4', 209.0),
Additional Resources
- Workbench API Classes: API Classes
- Consulting Available: SuperCowPowers LLC