describe_model() | Teradata Python Package - 17.00 - describe_model() - Teradata Package for Python

Teradata® Package for Python User Guide

Product
Teradata Package for Python
Release Number
17.00
Release Date
November 2021
Content Type
User Guide
Publication ID
B700-4006-070K
Language
English (United States)
The describe_model() function lists the following details of a model:
  • Model name provided while saving the model.
  • Description provided while saving the model.
  • Algorithm.
  • Prediction type.
  • Target column, if any.
  • Project provided while saving the model.
  • Entity target.
  • Name of the engine that generated the model.
  • Name of the client that generated the model.
  • The access level set for the model.
  • The status of the model.
  • The time required to run the model generating function.
  • The name of the user who created the model.
  • The date and time when the model was saved.
  • The arguments that were passed to the model generating function.
  • The input details, if they were saved.
  • The output names and the names of the underlying tables which are the actual model tables for the model saved.

The required argument name, which is also the only argument, specifies the name of the model to list the details for.

A user can only describe the models that he or she has access to.

Example Prerequisites

Follow the steps in save_model() to create a classification tree model that can be input to DecisionForestPredict and save the generated model.

Example

List all details of the saved model 'decision_forest_model'.

>>> # List all details of recently saved model 'decision_forest_model'.
>>> describe_model(name="decision_forest_model")
 
  
*** 'decision_forest_model': Model Details ***
ModelName                   decision_forest_model
ModelDescription             Decision Forest test
ModelAlgorithm                     DecisionForest
ModelPredictionType                CLASSIFICATION
ModelTargetColumn                       homestyle
ModelProject                                 None
ModelEntityTarget                            None
ModelGeneratingEngine                   ML Engine
ModelGeneratingClient                  teradataml
ModelAccess                               Private
ModelStatus                        In-Development
ModelBuildTime                                  0
ModelLocation                 Advanced SQL Engine
CreatedBy                                   ALICE
CreatedDate            2020-05-17 23:59:48.740000
  
  
*** 'decision_forest_model': Model Attributes ***
                      AttrName                                          AttrValue
0                    mtry_seed                                                100
1                     nodesize                                                  1
2                         mtry                                                  3
3                     outofbag                                              False
4                         seed                                                100
5   display_num_processed_rows                                              False
6                        ntree                                                 50
7                      formula  homestyle ~ driveway + recroom + fullbase + ga...
8           maxnum_categorical                                                 20
9                    max_depth                                                 12
10        categorical_encoding                                           graycode
11                   tree_type                                     classification
12                    variance                                                  0
13                   tree_size                                                100
  
  
*** 'decision_forest_model': Model Training Data ***
  InputName           InputTableName  NRows  NCols
0      data  "ALICE"."housing_train"    492     14
  
  
*** 'decision_forest_model': Model Training Objects ***
         OutputName                                    OutputTableName
0     monitor_table  "ALICE"."ml__td_decisionforest1_1589794611679956"
1  predictive_model  "ALICE"."ml__td_decisionforest0_1589787736719763"
2            output       "ALICE"."ml__td_sqlmr_out__1589787498246673"