elbow¶
In [ ]:
elbow(input_relation: (str, vDataFrame),
X: list = [],
n_cluster: (tuple, list) = (1, 15),
init: (str, list) = "kmeanspp",
max_iter: int = 50,
tol: float = 1e-4,
ax=None,
**style_kwds,)
Draws an Elbow curve.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
input_relation | str | ❌ | Relation to use to train the model. |
X | list | ✓ | List of the predictor columns. If empty all the numerical vcolumns will be used. |
n_cluster | tuple / list | ✓ | Tuple representing the number of cluster to start with and to end with. It can also be customized list with the different K to test. |
init | str / list | ✓ | The method to use to find the initial cluster centers.
|
max_iter | int | ✓ | The maximum number of iterations the algorithm performs. |
tol | float | ✓ | Determines whether the algorithm has converged. The algorithm is considered converged after no center has moved more than a distance of 'tol' from the previous iteration. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [8]:
from verticapy.learn.model_selection import elbow
elbow(input_relation = "public.iris",
X = ["PetalLengthCm", "PetalWidthCm"])
Out[8]:
