load_model

In [ ]:
load_model(name: str, 
           input_relation: str = "",
           test_relation: str = "")

Loads a Vertica model and returns the associated object.

Parameters

Name Type Optional Description
name
str
Model Name.
input_relation
str
Some automated functions may depend on the input relation. If the load_model function could not find the input relation from the call string, it is important to manually fill it.
test_relation
str
Relation to use to do the testing. All the methods will use this relation for the scoring. If empty, the training relation will be used as testing.

Returns

model : The model.

Example

In [2]:
from verticapy.learn.tools import *
model = load_model("logit_titanic")
model
Out[2]:

=======
details
=======
 predictor |coefficient|std_err |z_value |p_value 
-----------+-----------+--------+--------+--------
 Intercept |  0.27678  | 0.43558| 0.63541| 0.52516
    age    | -0.01807  | 0.00626|-2.88476| 0.00392
family_size| -0.02921  | 0.05317|-0.54926| 0.58283
   fare    |  0.01571  | 0.00329| 4.77443| 0.00000
  pclass   | -0.05925  | 0.12269|-0.48292| 0.62915
    sex    | -0.10181  | 0.16029|-0.63519| 0.52530


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


===========
call_string
===========
logistic_reg('public.logit_titanic', '"public".VERTICAPY_SPLIT_titanicclean_67_TRAIN', '"survived"', '"age", "family_size", "fare", "pclass", "sex"'
USING PARAMETERS optimizer='cgd', epsilon=0.0001, max_iterations=100, regularization='l2', lambda=1, alpha=0)

===============
Additional Info
===============
       Name       |Value
------------------+-----
 iteration_count  |  4  
rejected_row_count|  0  
accepted_row_count| 840