andrews_curves module¶
Draw Andrews curves from a Dataset
.
The AndrewsCurves
class implements the Andrew plot, a.k.a. Andrews curves,
which is a way to visualize \(n\) samples of a high-dimensional vector
in a 2D referential by projecting each sample
onto the vector
which is composed of the \(d\) first elements of the Fourier series:
Each curve \(t\mapsto f_i(t)\) is plotted over the interval \([-\pi,\pi]\) and structure in the data may be visible in these \(n\) Andrews curves.
A variable name can be passed to the DatasetPlot.execute()
method
by means of the classifier
keyword
in order to color the curves according to the value of the variable name.
This is useful when the data is labeled.
- class gemseo.post.dataset.andrews_curves.AndrewsCurves(dataset, classifier)[source]
Bases:
DatasetPlot
Andrews curves.
- Parameters:
- Raises:
ValueError – If the dataset is empty.
- colormap: str
The color map.
- dataset: Dataset
The dataset to be plotted.
- fig_size: FigSizeType
The figure size.
- font_size: int
The font size.
- legend_location: str
The location of the legend.
- title: str
The title of the plot.
- xlabel: str
The label for the x-axis.
- xtick_rotation: float
The rotation angle in degrees for the x-ticks.
- ylabel: str
The label for the y-axis.
- zlabel: str
The label for the z-axis.