NeuralTSNE.Plotter package
Submodules
NeuralTSNE.Plotter.plot module
- plot(data: ndarray, labels: ndarray | None, step: int, marker_size: int, alpha: float, are_neural_labels: bool = False, img_file: str | None = None, kwargs: dict | None = None) None [source]View on GitHub
Plot t-SNE results.
- Parameters:
data (np.ndarray) – t-SNE data to be plotted.
labels (np.ndarray, optional) – Labels corresponding to the data points.
step (int) – Step size for subsampling the data.
marker_size (int) – Marker size for the scatter plot.
alpha (float) – Alpha value for transparency in the scatter plot.
are_neural_labels (bool, optional) – Flag indicating whether the labels are neural network predictions.
img_file (str, optional) – File path to save the plot as an image.
**kwargs (dict, optional) – Additional keyword arguments.
Important
The following additional keyword arguments are available:
- file_stepint, optional
Step size for subsampling labels. Defaults to 1.
Note
This function plots the t-SNE results with scatter plot, allowing customization of various plot parameters.
- plot_from_file(file: str, labels_file: str, columns: List[int], step: int, marker_size: int, alpha: float, are_neural_labels: bool = False) None [source]View on GitHub
Plot t-SNE results from file.
- Parameters:
file (str) – File path containing t-SNE data.
labels_file (str) – File path containing labels data.
columns (List[int]) – Column indices to load from the labels file.
step (int) – Step size for subsampling the data.
marker_size (int) – Marker size for the scatter plot.
alpha (float) – Alpha value for transparency in the scatter plot.
are_neural_labels (bool, optional) – Flag indicating whether the labels are neural network predictions.
Note
This function reads t-SNE data and labels from files, applies subsampling, and plots the results using the plot function.