Model.plot_cos2¶
In [ ]:
Model.plot_cos2(dimensions: tuple = (1, 2),
ax=None,
**style_kwds,)
Draws a MCA cos2 plot of the two input dimensions.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
dimensions | tuple | ✓ | Tuple of two IDs of the model's components. |
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 [12]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
# Computing the Transformed Completely Disjontive Table before fitting the model
tcdt = titanic[["survived", "pclass", "sex"]].cdt()
from verticapy.learn.decomposition import MCA
model = MCA(name = "public.mca_titanic")
model.fit(tcdt)
model.plot_cos2()
Out[12]:
