Voronoi Plot

In [10]:
%matplotlib inline
from verticapy.datasets import load_iris

iris = load_iris()

from verticapy.learn.cluster import KMeans
model = KMeans(name = "public.KMeans_iris")
model.drop()
model.fit(iris,
          ["PetalLengthCm", "PetalWidthCm"],)

# with data points
model.plot_voronoi()
Out[10]:
<module 'matplotlib.pyplot' from '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/pyplot.py'>
In [11]:
# without data points
model.plot_voronoi(max_nb_points = 0)
Out[11]:
<module 'matplotlib.pyplot' from '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/pyplot.py'>