### ExplanationDashboard Source: https://erroranalysis.ai/raiwidgets.html Initializes the Explanation dashboard to visualize model explanations. ```APIDOC ## class ExplanationDashboard(explanation, model=None, dataset=None, true_y=None, classes=None, features=None, public_ip=None, port=None, locale=None) ### Description Wraps the explanation dashboard component to visualize model explanations. ### Parameters - **explanation** (ExplanationMixin) - Required - Object representing an explanation. - **model** (object) - Optional - Model object with predict() or predict_proba() methods. - **dataset** (numpy.ndarray/list) - Optional - Feature matrix. - **true_y** (numpy.ndarray/list) - Optional - True labels. - **classes** (numpy.ndarray/list) - Optional - Class names. - **features** (numpy.ndarray/list) - Optional - Feature names. - **public_ip** (str) - Optional - External IP for remote VM. - **port** (int) - Optional - Port for local service. - **locale** (str) - Optional - Language code (default 'en'). ``` -------------------------------- ### Run Error Analysis with Model and Explanation Source: https://erroranalysis.ai/raiwidgets.html Initialize the dashboard using a model object and a pre-computed explanation. ```python >>> from raiwidgets import ErrorAnalysisDashboard >>> ErrorAnalysisDashboard(global_explanation, model, ... dataset=X_test, true_y=y_test) ``` -------------------------------- ### Run ErrorAnalysisDashboard Source: https://erroranalysis.ai/raiwidgets.html Initializes the ErrorAnalysisDashboard with both sample and full datasets for model error evaluation. ```python >>> from raiwidgets import ErrorAnalysisDashboard >>> ErrorAnalysisDashboard(sample_dataset=X_test_sample, ... dataset=X_test, ... features=features, ... true_y=y_test_sample, ... true_y_dataset=y_test, ... pred_y=X_test_sample_pred_y, ... pred_y_dataset=X_test_pred_y) ``` -------------------------------- ### FairnessDashboard Source: https://erroranalysis.ai/raiwidgets.html Initializes the Fairness dashboard to evaluate model fairness metrics. ```APIDOC ## class FairnessDashboard(sensitive_features, y_true, y_pred, locale=None, public_ip=None, port=None, fairness_metric_module=None, fairness_metric_mapping=None) ### Description Wraps the fairness dashboard component to evaluate model predictions against sensitive features. ### Parameters - **sensitive_features** (pandas.Series/DataFrame/list/dict) - Required - Sensitive features for fairness analysis. - **y_true** (numpy.ndarray/list) - Required - True labels. - **y_pred** (pandas.Series/DataFrame/list/dict) - Required - Model predictions. - **locale** (str) - Optional - Language code. - **public_ip** (str) - Optional - External IP for remote VM. - **port** (int) - Optional - Port for local service. ``` -------------------------------- ### Run Error Analysis with Predictions and True Labels Source: https://erroranalysis.ai/raiwidgets.html Initialize the dashboard using only prediction results and ground truth labels. ```python >>> predictions = model.predict(X_test) >>> from raiwidgets import ErrorAnalysisDashboard >>> ErrorAnalysisDashboard(dataset=X_test, true_y=y_test, ... features=features, pred_y=predictions) ``` -------------------------------- ### ErrorAnalysisDashboard Source: https://erroranalysis.ai/raiwidgets.html The ErrorAnalysisDashboard class is used to initialize and launch an interactive error analysis dashboard for model evaluation. ```APIDOC ## class raiwidgets.ErrorAnalysisDashboard ### Description Initializes the ErrorAnalysisDashboard to visualize model performance, error patterns, and explanations. It supports both classification and regression tasks. ### Parameters - **explanation** (ExplanationMixin) - Optional - An object representing an explanation. - **model** (object) - Optional - The model object, expected to have predict_proba() for classification or predict() for regression. - **dataset** (pd.DataFrame/numpy.ndarray/list) - Optional - The feature matrix used for analysis. - **true_y** (numpy.ndarray/list) - Optional - The true labels for the dataset. - **classes** (numpy.ndarray/list) - Optional - Class names for classification tasks. - **features** (numpy.ndarray/list) - Optional - Feature names. - **port** (int) - Optional - Port for the locally hosted service. - **public_ip** (str) - Optional - External public IP address if running on a remote VM. - **categorical_features** (list[str]) - Optional - Names of categorical features. - **true_y_dataset** (numpy.ndarray/list) - Optional - True labels for the provided dataset. - **pred_y** (numpy.ndarray/list) - Optional - Predicted values. - **pred_y_dataset** (numpy.ndarray/list/pandas.Series) - Optional - Predicted labels for the provided dataset. - **model_task** (str) - Optional - Specifies if the model is for classification or regression. - **metric** (str) - Optional - Metric to evaluate at tree nodes or heatmap grids. - **max_depth** (int) - Optional - Maximum depth of the surrogate tree. - **num_leaves** (int) - Optional - Number of leaves in the surrogate tree. - **min_child_samples** (int) - Optional - Minimum samples required for a leaf. - **sample_dataset** (pd.DataFrame/numpy.ndarray/list) - Optional - A subset of the dataset for performance optimization. - **locale** (str) - Optional - Language for the dashboard interface. ### Usage Example ```python from raiwidgets import ErrorAnalysisDashboard ErrorAnalysisDashboard(dataset=X_test, true_y=y_test, features=features, pred_y=predictions) ``` ``` -------------------------------- ### raiwidgets.ResponsibleAIDashboard Source: https://erroranalysis.ai/raiwidgets.html The ResponsibleAIDashboard class is the primary interface for initializing and hosting the Responsible AI dashboard component. ```APIDOC ## class raiwidgets.ResponsibleAIDashboard ### Description The ResponsibleAIDashboard class wraps the dashboard component to visualize RAIInsights analysis. ### Parameters - **analysis** (RAIInsights) - Required - An object that represents an RAIInsights analysis. - **public_ip** (str) - Optional - The external public IP address of the VM if running on a remote VM. - **port** (int) - Optional - The port to use on the locally hosted service. - **locale** (str) - Optional - The language in which to load the dashboard (default is "en"). - **cohort_list** (List[Cohort]) - Optional - List of cohorts defined by the user. - **is_private_link** (bool) - Optional - Indicates if the dashboard environment is a private link AML workspace. ``` -------------------------------- ### ErrorAnalysisDashboard Source: https://erroranalysis.ai/raiwidgets.html Initializes the Error Analysis dashboard to visualize model errors on large and downsampled datasets. ```APIDOC ## class ErrorAnalysisDashboard(sample_dataset, dataset, features, true_y, true_y_dataset, pred_y, pred_y_dataset) ### Description Initializes the ErrorAnalysisDashboard component for analyzing model performance and errors. ### Parameters - **sample_dataset** (numpy.ndarray/list) - Required - Downsampled dataset for UI. - **dataset** (numpy.ndarray/list) - Required - Full dataset. - **features** (numpy.ndarray/list) - Required - Feature names. - **true_y** (numpy.ndarray/list) - Required - True labels for sample dataset. - **true_y_dataset** (numpy.ndarray/list) - Required - True labels for full dataset. - **pred_y** (numpy.ndarray/list) - Required - Predictions for sample dataset. - **pred_y_dataset** (numpy.ndarray/list) - Required - Predictions for full dataset. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.