Model.fit

In [ ]:
Model.fit(input_relation: (str, vDataFrame), 
          X: list = [], 
          key_columns: list = [], 
          index: str = "")

Trains the model.

Parameters

Name Type Optional Description
input_relation
str / vDataFrame
❌
Training relation.
X
list
✓
List of the predictors. If empty, all the numerical vcolumns will be used.
key_columns
list
✓
Columns not used during the algorithm computation but which will be used to create the final relation.
index
str
✓
Index to use to identify each row separately. It is highly recommanded to have one already in the main table to avoid creation of temporary tables.

Returns

object : self

Example

In [5]:
from verticapy.learn.cluster import DBSCAN
model = DBSCAN(name = "public.DBSCAN_iris")
model.fit("public.iris", 
          ["PetalLengthCm", "PetalWidthCm"])
Out[5]:
=======
details
=======
Number of Clusters: 6
Number of Outliers: 0

===============
Additional Info
===============
Input Relation : public.iris
X : "PetalLengthCm", "PetalWidthCm"