omnixai.visualization package

dashboard

The OmniXAI dashboard.

This package provides a dashboard implemented using Plotly Dash for visualization.

omnixai.visualization.dashboard module

The OmniXAI dashboard.

class omnixai.visualization.dashboard.Dashboard(instances=None, local_explanations=None, global_explanations=None, data_explanations=None, prediction_explanations=None, class_names=None, params=None, explainer=None, second_explainer=None)

Bases: object

The OmniXAI dashboard.

dashboard = Dashboard(
    instances=instances,
    local_explanations=local_explanations,   # Set local explanation results
    global_explanations=global_explanations, # Set global explanation results
    data_explanations=None,                  # Set data analysis generated by ``DataAnalyzer``
    prediction_explanations=None,            # Set predication analysis generated by ``PredictionAnalyzer``
    class_names=class_names,                 # A list of class names
    params={"pdp": {"features": ["Age", "Education-Num", "Capital Gain",
                                 "Capital Loss", "Hours per week", "Education",
                                 "Marital Status", "Occupation"]}},
    explainer=explainer                      # Set a TabularExplainer if requiring what-if analysis.
)
dashboard.show()
Parameters
  • instances – The instances to explain.

  • local_explanations – The local explanation results.

  • global_explanations – The global explanation results.

  • data_explanations – The analysis of the dataset generated by DataAnalyzer.

  • prediction_explanations – The analysis of the prediction results generated by PredictionAnalyzer.

  • class_names – A list of the class names indexed by the labels, e.g., class_name = ['dog', 'cat'] means that label 0 corresponds to ‘dog’ and label 1 corresponds to ‘cat’.

  • params – A dict containing the additional parameters for plotting figures.

  • explainer – A TabularExplainer explainer to enable What-if explanations for tabular tasks.

  • second_explainer – A TabularExplainer explainer used to compare different models in What-if analysis.

show(host='127.0.0.1', port='8050')

Shows the dashboard.