pydiodon.plot_components_quality

pydiodon.plot_components_quality(Y, Qual, axis_1=1, axis_2=2, r=2, cmap='ocean', diam=50, title=None, x11=True, plotfile=None, fmt='png')[source]

Scatter plot of the principal components with each dot colored according to the cumulated quality of the item for a given axis

Parameters
Ya 2D numpy array

matrix of principal components

Quala 2D numpy array
matrix of cumulated quality per item over all principal axis
computed by diodon.plot_cumulated_quality_per_item(Y, …)
axis_1an integer
x axis of the plot
default value is 1
axis_2an integer
y axis of the plot
default value is 2
ran integer
the number of first axis over which to compute the cumulated quality per item
default value is r=2
cmapa string
the colormap selected for visualizing the quality by a color
default value is “ocean”
diaman integer
dot size of each item
default value is 50
titlea string
title for the plot
default value is None (no title)
x11a boolean
whether to display the plot on the screen
default value is True
plotfilea string
name of the file where to save the plot
default value is None (plot not saved)
fmta string
format for the file where to save the plot
possible values are png, eps, pdf
default value is png

Notes

Example

>>> import pydiodon as dio
>>> A, rn, cn = dio.load_dataset("diatoms_sweden")
>>> Y, L, V = dio.pca(A)
>>> Qual = dio.plot_cumulated_quality_per_item(Y)
>>> dio.plot_components_quality(Y, Qual)

af, revised 23.01.18