NNSOM.plots.SOMPlots.cmplx_hit_hist

SOMPlots.cmplx_hit_hist(x, clust, perc, ind_missClass, ind21, ind12, mouse_click=False, **kwargs)[source]

Generates a complex hit histogram for the SOM, incorporating information about cluster quality, misclassifications, and false positives/negatives.

Parameters:
  • x (array-like) – The input data to be visualized in the histogram.

  • clust (list or array-like) – A list or array containing the cluster assignments for each data point.

  • perc (array-like) – An array containing the percentage values for each cluster, representing the proportion of good binders.

  • ind_missClass (array-like) – An array containing the indices of misclassified data points.

  • ind21 (array-like) – An array containing the indices of false positive data points (classified as good binders but are actually bad binders).

  • ind12 (array-like) – An array containing the indices of false negative data points (classified as bad binders but are actually good binders).

  • mouse_click (bool, optional) – If True, enables the plot to respond to mouse clicks, allowing for interactive functionality such as querying or modifying neuron data, by default False.

  • **kwargs (dict) – Arbitrary keyword arguments that can be passed to the event handler onpick when an interactive element is clicked. Common parameters could include data specific to the plot or visualization settings.

Returns:

  • fig (matplotlib.figure.Figure) – The Figure object containing the plot.

  • ax (matplotlib.axes.Axes) – The Axes object containing the plot elements.

  • patches (list) – A list of matplotlib.patches.Patch objects representing the inner hexagons colored and styled based on cluster quality and misclassifications.

  • text (list) – A list of matplotlib.text.Text objects displaying the hit counts within each hexagon.