elphick.sklearn_viz.features.principal_components.plot_principal_components
- elphick.sklearn_viz.features.principal_components.plot_principal_components(x, color=None, plot_3d=True, loading_vectors=True, standardised=False, title=None)[source]
- Parameters:
x (
DataFrame
) – X values to transform and plot.color (
Optional
[Series
]) – optional series by which to color the markersplot_3d (
bool
) – If True plot the top 3 principal components in 3D, otherwise the top 2 in 2D.loading_vectors (
bool
) – If True and plot_type is ‘2D’|’3D’ loading vectors will be displayed.standardised (
bool
) – If True, plot the standardised PCA, where vectors are transformed to zero mean and unit variance.title (
Optional
[str
]) – Optional plot title
- Return type:
Figure
- Returns:
a plotly GraphObjects.Figure