40.5 Audit and Add Comments to Oracle Machine Learning for SQL Models

Perform audit of Oracle Machine Learning for SQL model objects through SQL statements.

OML4SQL model objects support SQL COMMENT and AUDIT statements.

40.5.1 Add a Comment to an Oracle Machine Learning for SQL Model

You can add a comment to an OML4SQL model object using SQL COMMENT statement.

Comments can be used to associate descriptive information with a database object. You can associate a comment with a machine learning model using a SQL COMMENT statement.

COMMENT ON MINING MODEL schema_name.model_name IS string;

Note:

To add a comment to a model in another schema, you must have the COMMENT ANY MINING MODEL system privilege.

To drop a comment, set it to the empty '' string.

The following statement adds a comment to the model DT_SH_CLAS_SAMPLE in your own schema.

COMMENT ON MINING MODEL dt_sh_clas_sample IS
           'Decision Tree model predicts promotion response';

You can view the comment by querying the catalog view USER_MINING_MODELS.

SELECT model_name, mining_function, algorithm, comments FROM user_mining_models; 

The output is as follows:


MODEL_NAME        MINING_FUNCTION  ALGORITHM      COMMENTS
----------------- ---------------- -------------- -----------------------------------------------
DT_SH_CLAS_SAMPLE CLASSIFICATION   DECISION_TREE  Decision Tree model predicts promotion response 

To drop this comment from the database, issue the following statement:

COMMENT ON MINING MODEL dt_sh_clas_sample '';

See Also:

40.5.2 Audit Oracle Machine Learning for SQL Models

Use Oracle Database auditing system to audit models to track operations on machine learning models.

The Oracle Database auditing system is a powerful, highly configurable tool for tracking operations on schema objects in a production environment. The auditing system can be used to track operations on machine learning models.

Note:

To audit machine learning models, you must have the AUDIT_ADMIN role.

Unified auditing is documented in Oracle Database Security Guide. However, the full unified auditing system is not enabled by default. Instructions for migrating to unified auditing are provided in Oracle Database Upgrade Guide.

See Also: