<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Model management</title>
    <link>/en/data-analysis/ml-predictive-analytics/model-management/</link>
    <description>Recent content in Model management on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/data-analysis/ml-predictive-analytics/model-management/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Data-Analysis: Model versioning</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/model-versioning/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/model-versioning/</guid>
      <description>
        
        
        &lt;p&gt;Model versioning provides an infrastructure to track and manage the status of registered models in a database. The versioning infrastructure supports a collaborative environment where multiple users can submit candidate models for individual applications, which are identified by their &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt;. Models in OpenText™ Analytics Database are unregistered by default, but any user with sufficient privileges can register a model to an application and add it to the versioning environment.&lt;/p&gt;
&lt;h2 id=&#34;register-models&#34;&gt;Register models&lt;/h2&gt;
&lt;p&gt;When a candidate model is ready to be submitted to an application, the model owner or any user with sufficient privileges, including any user with the DBADMIN or &lt;a href=&#34;../../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/mlsupervisor/#&#34;&gt;MLSUPERVISOR&lt;/a&gt; role, can register the model using the &lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/register-model/#&#34;&gt;REGISTER_MODEL&lt;/a&gt; function. The registered model is assigned an initial status of &#39;under_review&#39; and is visible in the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt; system table to users with USAGE privileges.&lt;/p&gt;
&lt;p&gt;All registered models under a given &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt; are considered different versions of the same model, regardless of trainer, algorithm type, or production status. If a model is the first to be registered to a given &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt;, the model is assigned a &lt;em&gt;&lt;code&gt;registered_version&lt;/code&gt;&lt;/em&gt; of one. Otherwise, newly registered models are assigned an incremented &lt;em&gt;&lt;code&gt;registered_version&lt;/code&gt;&lt;/em&gt; of &lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt; + 1, where &lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt; is the number of models already registered to the given &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt;. Each registered model can be uniquely identified by the combination of &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;registered_version&lt;/code&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;change-model-status&#34;&gt;Change model status&lt;/h2&gt;
&lt;p&gt;After a model is registered, the model owner is automatically changed to superuser and the previous owner is given USAGE privileges. The MLSUPERVISOR role has full privileges over all registered models, as does dbadmin. Only users with these two roles can call the &lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/change-model-status/#&#34;&gt;CHANGE_MODEL_STATUS&lt;/a&gt; function to change the status of registered models. There are six possible statuses for registered models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;under_review&lt;/code&gt;: Status assigned to newly registered models.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;staging&lt;/code&gt;: Model is targeted for A/B testing against the model currently in production.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;production&lt;/code&gt;: Model is in production for its specified application. Only one model can be in production for a given &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt; at one time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;archived&lt;/code&gt;: Status of models that were previously in production. Archived models can be returned to production at any time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;declined&lt;/code&gt;: Model is no longer in consideration for production.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;unregistered&lt;/code&gt;: Model is removed from the versioning environment. The model does not appear in the REGISTERED_MODELS system table.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following diagram depicts the valid status transitions:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/machine-learning/registered-model-states.png&#34; alt=&#34;&#34;&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

If you change the status of a model to &#39;production&#39; and there is already a model in production under the given &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt;, the status of the new model is set to &#39;production&#39; and that of the old model to &#39;archived&#39;.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;You can view the status history of registered models with the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-monitor-schema/model-status-history/#&#34;&gt;MODEL_STATUS_HISTORY&lt;/a&gt; system table, which includes models that have been unregistered or dropped. Only superusers or users to whom they have granted sufficient privileges can query the table. OpenText recommends granting access on the table to the MLSUPERVISOR role.&lt;/p&gt;
&lt;h2 id=&#34;managing-registered-models&#34;&gt;Managing registered models&lt;/h2&gt;
&lt;p&gt;Only users with the MLSUPERVISOR role, or those granted equivalent privileges, can drop or alter registered models. As with unregistered models, you can drop and alter registered models with the &lt;a href=&#34;../../../../en/sql-reference/statements/drop-statements/drop-model/#&#34;&gt;DROP MODEL&lt;/a&gt; and &lt;a href=&#34;../../../../en/sql-reference/statements/alter-statements/alter-model/#&#34;&gt;ALTER MODEL&lt;/a&gt; commands. Dropped models no longer appear in the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt; system table.&lt;/p&gt;
&lt;p&gt;To make predictions with a registered model, you must use the [&lt;em&gt;&lt;code&gt;schema_name.&lt;/code&gt;&lt;/em&gt;]&lt;em&gt;&lt;code&gt;model_name&lt;/code&gt;&lt;/em&gt; and predict function for the appropriate model type. You can find all necessary information in the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt; system table.&lt;/p&gt;
&lt;p&gt;Model registration does not effect the process of exporting models. However, model registration information, such as &lt;em&gt;&lt;code&gt;registered_version&lt;/code&gt;&lt;/em&gt;, is not captured in exported models. All imported models are initially unregistered, but each category of imported model—native Vertica, PMML, and TensorFlow—is compatible with model versioning.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example demonstrates a possible model versioning workflow. This workflow begins with registering multiple models to an application, continues with an MLSUPERVISOR managing and changing the status of those models, and concludes with one of the models in production.&lt;/p&gt;
&lt;p&gt;First, the models must be registered to an application. In this case, the models, &lt;code&gt;native_linear_reg&lt;/code&gt; and &lt;code&gt;linear_reg_spark1&lt;/code&gt;, are registered as the &lt;code&gt;linear_reg_app&lt;/code&gt; application:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT REGISTER_MODEL(&amp;#39;native_linear_reg&amp;#39;, &amp;#39;linear_reg_app&amp;#39;);
                           REGISTER_MODEL
-------------------------------------------------------------------------
Model [native_linear_reg] is registered as [linear_reg_app], version [2]
(1 row)

=&amp;gt; SELECT REGISTER_MODEL(&amp;#39;linear_reg_spark1&amp;#39;, &amp;#39;linear_reg_app&amp;#39;);
                           REGISTER_MODEL
-------------------------------------------------------------------------
Model [linear_reg_spark1] is registered as [linear_reg_app], version [3]
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can query the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt; system table to view details about the newly registered models, such as the version number and model status:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM REGISTERED_MODELS;
  registered_name | registered_version |    status    |        registered_time        |      model_id     | schema_name |    model_name     |      model_type       |    category
------------------+--------------------+--------------+-------------------------------+-------------------+-------------+-------------------+-----------------------+----------------
 linear_reg_app   |                  3 | UNDER_REVIEW | 2023-01-26 09:52:00.082166-04 | 45035996273714020 | public      | linear_reg_spark1 | PMML_REGRESSION_MODEL | PMML
 linear_reg_app   |                  2 | UNDER_REVIEW | 2023-01-26 09:51:04.553102-05 | 45035996273850350 | public      | native_linear_reg | LINEAR_REGRESSION     | VERTICA_MODELS
 linear_reg_app   |                  1 | PRODUCTION   | 2023-01-24 05:29:25.990626-02 | 45035996273853740 | public      | linear_reg_newton | LINEAR_REGRESSION     | VERTICA_MODELS
 logistic_reg_app |                  1 | PRODUCTION   | 2023-01-23 08:49:25.990626-02 | 45035996273853740 | public      | log_reg_cgd       | LOGISTIC_REGRESSION   | VERTICA_MODELS
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you query the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/models/#&#34;&gt;MODELS&lt;/a&gt; system table, you can see that the model owner has automatically been changed to superuser, dbadmin in this case:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT model_name, owner_name FROM MODELS WHERE model_name IN (&amp;#39;native_linear_reg&amp;#39;, &amp;#39;linear_reg_spark1&amp;#39;);
     model_name    | owner_name
-------------------+------------
 native_linear_reg | dbadmin
 linear_reg_spark1 | dbadmin
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As a user with the MLSUPERVISOR role enabled, you can then change the status of both models to &#39;staging&#39; with the &lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/change-model-status/#&#34;&gt;CHANGE_MODEL_STATUS&lt;/a&gt; function, which accepts a &lt;em&gt;&lt;code&gt;registered_name&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code&gt;registered_version&lt;/code&gt;&lt;/em&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CHANGE_MODEL_STATUS(&amp;#39;linear_reg_app&amp;#39;, 2, &amp;#39;staging&amp;#39;);
                          CHANGE_MODEL_STATUS
-----------------------------------------------------------------------------
The status of model [linear_reg_app] - version [2] is changed to [staging]
(1 row)

=&amp;gt; SELECT CHANGE_MODEL_STATUS(&amp;#39;linear_reg_app&amp;#39;, 3, &amp;#39;staging&amp;#39;);
                          CHANGE_MODEL_STATUS
-----------------------------------------------------------------------------
The status of model [linear_reg_app] - version [3] is changed to [staging]
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After comparing the evaluation metrics of the two staged models against the model currently in production, you can put the better performing model into production. In this case, the &lt;code&gt;linear_reg_spark1&lt;/code&gt; model is moved into production and the &lt;code&gt;linear_reg_spark1&lt;/code&gt; model is declined:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CHANGE_MODEL_STATUS(&amp;#39;linear_reg_app&amp;#39;, 2, &amp;#39;declined&amp;#39;);
CHANGE_MODEL_STATUS
-----------------------------------------------------------------------------
The status of model [linear_reg_app] - version [2] is changed to [declined]
(1 row)

=&amp;gt; SELECT CHANGE_MODEL_STATUS(&amp;#39;linear_reg_app&amp;#39;, 3, &amp;#39;production&amp;#39;);
CHANGE_MODEL_STATUS
-----------------------------------------------------------------------------
The status of model [linear_reg_app] - version [3] is changed to [production]
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can then query the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt; system table to confirm that the &lt;code&gt;linear_reg_spark1&lt;/code&gt; model is now in &#39;production&#39;, the &lt;code&gt;native_linear_reg&lt;/code&gt; model has been set to &#39;declined&#39;, and the previously in production &lt;code&gt;linear_reg_spark1&lt;/code&gt; model has been automatically moved to &#39;archived&#39;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM REGISTERED_MODELS;
  registered_name | registered_version |    status    |        registered_time        |      model_id     | schema_name |    model_name     |      model_type       |    category
------------------+--------------------+--------------+-------------------------------+-------------------+-------------+-------------------+-----------------------+----------------
 linear_reg_app   |                  3 | PRODUCTION   | 2023-01-26 09:52:00.082166-04 | 45035996273714020 | public      | linear_reg_spark1 | PMML_REGRESSION_MODEL | PMML
 linear_reg_app   |                  2 | DECLINED     | 2023-01-26 09:51:04.553102-05 | 45035996273850350 | public      | native_linear_reg | LINEAR_REGRESSION     | VERTICA_MODELS
 linear_reg_app   |                  1 | ARCHIVED     | 2023-01-24 05:29:25.990626-02 | 45035996273853740 | public      | linear_reg_newton | LINEAR_REGRESSION     | VERTICA_MODELS
 logistic_reg_app |                  1 | PRODUCTION   | 2023-01-23 08:49:25.990626-02 | 45035996273853740 | public      | log_reg_cgd       | LOGISTIC_REGRESSION   | VERTICA_MODELS
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To remove the declined &lt;code&gt;native_linear_reg&lt;/code&gt; model from the versioning environment, you can set the status to &#39;unregistered&#39;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CHANGE_MODEL_STATUS(&amp;#39;linear_reg_app&amp;#39;, 2, &amp;#39;unregistered&amp;#39;);
                            CHANGE_MODEL_STATUS
----------------------------------------------------------------------------------
The status of model [linear_reg_app] - version [2] is changed to [unregistered]
(1 row)

=&amp;gt; SELECT * FROM REGISTERED_MODELS;
  registered_name | registered_version |    status    |        registered_time        |      model_id     | schema_name |    model_name     |      model_type       |    category
------------------+--------------------+--------------+-------------------------------+-------------------+-------------+-------------------+-----------------------+----------------
 linear_reg_app   |                  3 | PRODUCTION   | 2023-01-26 09:52:00.082166-04 | 45035996273714020 | public      | linear_reg_spark1 | PMML_REGRESSION_MODEL | PMML
 linear_reg_app   |                  1 | ARCHIVED     | 2023-01-24 05:29:25.990626-02 | 45035996273853740 | public      | linear_reg_newton | LINEAR_REGRESSION     | VERTICA_MODELS
 logistic_reg_app |                  1 | PRODUCTION   | 2023-01-23 08:49:25.990626-02 | 45035996273853740 | public      | log_reg_cgd       | LOGISTIC_REGRESSION   | VERTICA_MODELS
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can see that the &lt;code&gt;native_linear_reg&lt;/code&gt; model no longer appears in the REGISTERED_MODELS system table. However, you can still query the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-monitor-schema/model-status-history/#&#34;&gt;MODEL_STATUS_HISTORY&lt;/a&gt; system table to view the status history of &lt;code&gt;native_linear_reg&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT * FROM MODEL_STATUS_HISTORY WHERE model_id=45035996273850350;
 registered_name | registered_version |  new_status  |  old_status  |       status_change_time      |    operator_id    | operator_name |      model_id     | schema_name |    model_name
-----------------+--------------------+--------------+------------- +-------------------------------+-------------------+---------------+-------------------+-------------+-------------------
linear_reg_app   |                  2 | UNDER_REVIEW | UNREGISTERED | 2023-01-26 09:51:04.553102-05 | 45035996273964824 | user1         | 45035996273850350 | public      | native_linear_reg
linear_reg_app   |                  2 | STAGING      | UNDER_REVIEW | 2023-01-29 11:33:02.052464-05 | 45035996273704962 | supervisor1   | 45035996273850350 | public      | native_linear_reg
linear_reg_app   |                  2 | DECLINED     | STAGING      | 2023-01-30 04:12:30.481136-05 | 45035996273704962 | supervisor1   | 45035996273850350 | public      | native_linear_reg
linear_reg_app   |                  2 | UNREGISTERED | DECLINED     | 2023-02-02 03:25:32.332132-05 | 45035996273704962 | supervisor1   | 45035996273850350 | public      | native_linear_reg
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/registered-models/#&#34;&gt;REGISTERED_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/system-tables/v-monitor-schema/model-status-history/#&#34;&gt;MODEL_STATUS_HISTORY&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/register-model/#&#34;&gt;REGISTER_MODEL&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/change-model-status/#&#34;&gt;CHANGE_MODEL_STATUS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/mlsupervisor/#&#34;&gt;MLSUPERVISOR&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Altering models</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/altering-models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/altering-models/</guid>
      <description>
        
        
        &lt;p&gt;You can modify a model using 
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/statements/alter-statements/alter-model/#&#34;&gt;ALTER MODEL&lt;/a&gt;&lt;/code&gt;, in response to your model&#39;s needs. You can alter a model by renaming the model, changing the owner, and changing the schema.&lt;/p&gt;
&lt;p&gt;You can drop or alter any model that you create.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Dropping models</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/dropping-models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/dropping-models/</guid>
      <description>
        
        
        &lt;p&gt;
&lt;code&gt;&lt;a href=&#34;../../../../en/sql-reference/statements/drop-statements/drop-model/#&#34;&gt;DROP MODEL&lt;/a&gt;&lt;/code&gt; removes one or more models from the database. For example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Find the model you want to drop.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM V_CATALOG.MODELS WHERE model_name=&amp;#39;mySvmClassModel&amp;#39;;
-[ RECORD 1 ]--+--------------------------------
model_id       | 45035996273765414
model_name     | mySvmClassModel
schema_id      | 45035996273704978
schema_name    | public
owner_id       | 45035996273704962
owner_name     | dbadmin
category       | VERTICA_MODELS
model_type     | SVM_CLASSIFIER
is_complete    | t
create_time    | 2017-02-14 10:30:44.903946-05
size           | 525
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Drop the model.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; DROP MODEL mySvmClassModel;
     DROP MODEL
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Review &lt;code&gt;V_CATALOG.MODELS&lt;/code&gt; to verify that the model was dropped.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM V_CATALOG.MODELS WHERE model_name=&amp;#39;mySvmClassModel&amp;#39;;
(0 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Managing model security</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/managing-model-security/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/managing-model-security/</guid>
      <description>
        
        
        &lt;p&gt;You can manage the security privileges on your models by using the GRANT and REVOKE statements. The following examples show how you can change privileges on user1 and user2 using the &lt;code&gt;faithful&lt;/code&gt; table and the linearReg model.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In the following example, the dbadmin grants the SELECT privilege to user1:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT SELECT ON TABLE faithful TO user1;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, the dbadmin grants the CREATE privilege on the public schema to user1:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT CREATE ON SCHEMA public TO user1;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect to the database as user1:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - user1
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As user1, build the linearReg model:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LINEAR_REG(&amp;#39;linearReg&amp;#39;, &amp;#39;faithful&amp;#39;, &amp;#39;waiting&amp;#39;, &amp;#39;eruptions&amp;#39;);
LINEAR_REG
---------------------------
Finished in 1 iterations
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;As user1, grant USAGE privileges to user2:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT USAGE ON MODEL linearReg TO user2;
GRANT PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Connect to the database as user2:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - user2
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;To confirm privileges were granted to user2, run the GET_MODEL_SUMMARY function. A user with the USAGE privilege on a model can run GET_MODEL_SUMMARY on that model:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT GET_MODEL_SUMMARY(USING PARAMETERS model_name=&amp;#39;linearReg&amp;#39;);

=======
details
=======
predictor|coefficient|std_err |t_value |p_value
---------+-----------+--------+--------+--------
Intercept| 33.47440  | 1.15487|28.98533| 0.00000
eruptions| 10.72964  | 0.31475|34.08903| 0.00000

==============
regularization
==============
type| lambda
----+--------
none| 1.00000

===========
call_string
===========
linear_reg(&amp;#39;public.linearReg&amp;#39;, &amp;#39;faithful&amp;#39;, &amp;#39;&amp;#34;waiting&amp;#34;&amp;#39;, &amp;#39;eruptions&amp;#39;
USING PARAMETERS optimizer=&amp;#39;newton&amp;#39;, epsilon=1e-06, max_iterations=100, regularization=&amp;#39;none&amp;#39;, lambda=1)

===============
Additional Info
===============
Name              |Value
------------------+-----
iteration_count   |  1
rejected_row_count|  0
accepted_row_count| 272
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Connect to the database as user1:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - user1
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Then, you can use the REVOKE statement to revoke privileges from user2:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; REVOKE USAGE ON MODEL linearReg FROM user2;
REVOKE PRIVILEGE
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;To confirm the privileges were revoked, connect as user 2 and run the GET_MODEL_SUMMARY function:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \c - user2
=&amp;gt;SELECT GET_MODEL_SUMMARY(&amp;#39;linearReg&amp;#39;);
ERROR 7523:  Problem in get_model_summary.
Detail: Permission denied for model linearReg
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/grant-statements/grant-model/#&#34;&gt;GRANT (model)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/revoke-statements/revoke-model/#&#34;&gt;REVOKE (model)&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Viewing model attributes</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/viewing-model-attributes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/viewing-model-attributes/</guid>
      <description>
        
        
        &lt;p&gt;The following topics explain the model attributes for machine learning algorithms. These attributes describe the internal structure of a particular model:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-evaluation/cross-validate/#ModelAttributes&#34;&gt;Cross validation model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/kmeans/#ModelAttributes&#34;&gt;K-means model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/naive-bayes/#ModelAttributes&#34;&gt;Naive Bayes model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/data-preparation/normalize-fit/#ModelAttributes&#34;&gt;Normalization model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/data-preparation/one-hot-encoder-fit/#ModelAttributes&#34;&gt;One Hot Encoder model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/rf-classifier/#ModelAttributes&#34;&gt;Random forest model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/linear-reg/#ModelAttributes&#34;&gt;Regression model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/ml-algorithms/svm-classifier/#ModelAttributes&#34;&gt;SVM model attributes&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Summarizing models</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/summarizing-models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/summarizing-models/</guid>
      <description>
        
        
        &lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Find the model you want to summarize.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM v_catalog.models WHERE model_name=&amp;#39;svm_class&amp;#39;;
model_id      | model_name |     schema_id   | schema_name |     owner_id      | owner_name |    category    |
model_type   | is_complete |     create_time          | size
-------------------+------------+-------------------+-------------+-------------------+------------+--------
--------+----------------+-------------+-------------------------------+------
45035996273715226 | svm_class  | 45035996273704980 | public      | 45035996273704962 | dbadmin    | VERTICA_MODELS
| SVM_CLASSIFIER | t           | 2017-08-28 09:49:00.082166-04 | 1427
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the model summary.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT GET_MODEL_SUMMARY(USING PARAMETERS model_name=&amp;#39;svm_class&amp;#39;);
------------------------------------------------------------------------

=======
details
=======
predictor|coefficient
---------+-----------
Intercept| -0.02006
cyl      |  0.15367
mpg      |  0.15698
wt       | -1.78157
hp       |  0.00957

===========
call_string
===========
SELECT svm_classifier(&amp;#39;public.svm_class&amp;#39;, &amp;#39;mtcars_train&amp;#39;, &amp;#39;&amp;#34;am&amp;#34;&amp;#39;, &amp;#39;cyl, mpg, wt, hp, gear&amp;#39;
USING PARAMETERS exclude_columns=&amp;#39;gear&amp;#39;, C=1, max_iterations=100, epsilon=0.001);

===============
Additional Info
===============
Name              |Value
------------------+-----
accepted_row_count| 20
rejected_row_count|  0
iteration_count   | 12
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/ml-functions/model-management/get-model-summary/#&#34;&gt;GET_MODEL_SUMMARY&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: Viewing models</title>
      <link>/en/data-analysis/ml-predictive-analytics/model-management/viewing-models/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/model-management/viewing-models/</guid>
      <description>
        
        
        &lt;p&gt;The database stores the models you create in the &lt;code&gt;V_CATALOG.MODELS&lt;/code&gt; system table.&lt;/p&gt;
&lt;p&gt;You can query &lt;code&gt;V_CATALOG.MODELS&lt;/code&gt; to view information about the models you have created:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM V_CATALOG.MODELS;
-[ RECORD 1 ]--+------------------------------------------
model_id       | 45035996273765414
model_name     | mySvmClassModel
schema_id      | 45035996273704978
schema_name    | public
owner_id       | 45035996273704962
owner_name     | dbadmin
category       | VERTICA_MODELS
model_type     | SVM_CLASSIFIER
is_complete    | t
create_time    | 2017-02-14 10:30:44.903946-05
size           | 525
-[ RECORD 2 ]--+------------------------------------------

model_id       | 45035996273711466
model_name     | mtcars_normfit
schema_id      | 45035996273704978
schema_name    | public
owner_id       | 45035996273704962
owner_name     | dbadmin
category       | VERTICA_MODELS
model_type     | SVM_CLASSIFIER
is_complete    | t
create_time    | 2017-02-06 15:03:05.651941-05
size           | 288
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/models/#&#34;&gt;MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/system-tables/v-catalog-schema/#&#34;&gt;V_CATALOG schema&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
