DummyTreeRegressor

In [ ]:
DummyTreeRegressor(name: str)

A regressor that overfits the training data. These models are typically used as a control to compare with your other models.

Parameters

Name Type Optional Description
name
str
Name of the model to be stored in the database.

Attributes

After the object is created, all parameters become attributes. Additional attributes will be created when fitting the model:

Name Type Description
input_relation
str
Training relation.
X
list
List of the predictors.
y
str
Response column.
test_relation
str
Relation to use to test the model. All model methods are abstractions that simplify the process. The testing relation will be used by the methods to evaluate the model. If empty, the training relation will be used instead. This attribute can be changed at any time.

Methods

Name Description
contour Draws the model's contour plot.
deploySQL Returns the SQL code needed to deploy the model.
drop Drops the model from the Vertica DB.
features_importance Computes the model features importance using the Gini Index.
fit Trains the model.
get_attr Returns the model attribute.
get_params Returns the model Parameters.
get_tree Returns a tablesample with all the input tree information.
plot Draws the Model.
plot_tree Draws the input tree (requires the graphviz module).
predict Predicts using the input relation.
regression_report / report Computes a regression report using multiple metrics to evaluate the model (r2, mse, max error...).
score Computes the model score.
set_params Sets the parameters of the model.
to_graphviz Converts the input tree to a Graphviz tree.
to_memmodel Converts a specified Vertica model to a memModel model.
to_python Returns the Python code needed to deploy the model without using built-in Vertica functions.
to_sql Returns the SQL code needed to deploy the model without using Vertica built-in functions.

Example

In [7]:
from verticapy.learn.tree import DummyTreeRegressor
model = DummyTreeRegressor(name = "public.rf_winequality")
display(model)
<RandomForestRegressor>