Model.plot

In [ ]:
Model.plot(max_nb_points: int = 50,
           ax=None, 
           **style_kwds,)

Draws the model.

Parameters

Name Type Optional Description
max_nb_points
int
✓
Maximum number of points to display.
ax
Matplotlib axes object
✓
The axes to plot on.
**style_kwds
any
✓
Any optional parameter to pass to the Matplotlib functions.

Returns

ax : Matplotlib axes object

Example

In [3]:
# SVM
from verticapy.learn.svm import LinearSVC
model = LinearSVC(name = "public.SVC_iris")
model.drop()
model.fit("public.iris_clean", 
          ["PetalLengthCm", "PetalWidthCm"], 
          "Species_Iris-setosa")
model.plot()
Out[3]:
<AxesSubplot:xlabel='"PetalLengthCm"', ylabel='"PetalWidthCm"'>
In [6]:
# Logit
from verticapy.learn.linear_model import LogisticRegression
model = LogisticRegression(name = "public.SVC_titanic")
model.drop()
model.fit("public.titanic", 
          ["fare", "age"], 
          "survived")
model.plot()
Out[6]:
<Axes3DSubplot:xlabel='"fare"', ylabel='"age"'>