vDataFrame.density¶
In [ ]:
vDataFrame.density(columns: list = [],
bandwidth: float = 1.0,
kernel: str = "gaussian",
nbins: int = 200,
xlim = None,
ax=None,
**style_kwds,)
Draws the vcolumns Density Plot.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
columns | list | ✓ | List of the vcolumns names. If empty, all the numerical vcolumns will be selected. |
bandwidth | float | ✓ | The bandwidth of the kernel. |
kernel | str | ✓ | The method used for the plot.
|
nbins | int | ✓ | Maximum number of points to use to evaluate the approximate density function. Increasing this parameter will increase the precision but will also increase the time of the learning and scoring phases. |
xlim | tuple | ✓ | Set the x limits of the current axes. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
In [1]:
from verticapy.datasets import load_iris
iris = load_iris()
display(iris)
In [4]:
iris.density()
Out[4]:
In [5]:
# Density using 10 points
iris.density(nbins=10)
Out[5]:
In [6]:
# Logistic Kernel
iris.density(kernel = "logistic")
Out[6]:
In [7]:
# Using xlim
iris.density(xlim = [0, 10])
Out[7]:
See Also¶
| vDataFrame[].density | Draws the vcolumn Density Plot. |
