dianna.visualization.tabular ============================ .. py:module:: dianna.visualization.tabular .. autoapi-nested-parse:: Visualization module for tabular data. Functions --------- .. autoapisummary:: dianna.visualization.tabular.plot_tabular Module Contents --------------- .. py:function:: plot_tabular(x: numpy.ndarray, y: List[str], x_label: str = 'Importance score', y_label: str = 'Features', num_features: Optional[int] = None, show_plot: Optional[bool] = True, output_filename: Optional[str] = None, ax: Optional[matplotlib.pyplot.Axes] = None) -> matplotlib.pyplot.Figure Plot feature importance with segments highlighted. :param x: 1D array of feature importance scores of one instance :type x: np.ndarray :param y: List of feature names :type y: List[str] :param x_label: Label for the x-axis :type x_label: str :param y_label: Label or list of labels for the y-axis :type y_label: str :param num_features: Number of most salient features to display :type num_features: Optional[int] :param show_plot: Shows plot if true (for testing or writing plots to disk instead). :type show_plot: bool, optional :param output_filename: Name of the file to save the plot to (optional). :type output_filename: str, optional :param ax: externally created canvas to plot on. :type ax: matplotlib.Axes, optional :returns: plt.Figure