Skip to content

Model Diagnostics

ModelDiagnostics

Interact with model diagnostics in the Driverless AI server.

create

create(
    diagnose_experiment: Experiment, test_dataset: Dataset
) -> ModelDiagnostic

Creates a model diagnostic in the Driverless AI server.

Parameters:

  • diagnose_experiment (Experiment) –

    Experiment to be diagnosed.

  • test_dataset (Dataset) –

    Test dataset for the diagnosis.

Returns:

create_async

create_async(
    diagnose_experiment: Experiment, test_dataset: Dataset
) -> ModelDiagnosticJob

Launches the creation of a model diagnostic in the Driverless AI server.

Parameters:

  • diagnose_experiment (Experiment) –

    Experiment to be diagnosed.

  • test_dataset (Dataset) –

    Test dataset for the diagnosis.

Returns:

  • ModelDiagnosticJob

    Started the model diagnostic job.

get

get(key: str) -> ModelDiagnostic

Retrieves a model diagnostic in the Driverless AI server.

Parameters:

  • key (str) –

    The unique ID of the model diagnostic.

Returns:

gui

gui() -> Hyperlink

Returns the full URL to the Model Diagnostics page in the Driverless AI server.

Returns:

  • Hyperlink

    The full URL to the Model Diagnostics page.

list

list(start_index: int = 0, count: int = None) -> Sequence[ModelDiagnostic]

Retrieves model diagnostics in the Driverless AI server.

Parameters:

  • start_index (int, default: 0 ) –

    The index of the first model diagnostic to retrieve.

  • count (int, default: None ) –

    The maximum number of model diagnostics to retrieve. If None, retrieves all available model diagnostics.

Returns:

ModelDiagnostic

A model diagnostic in the Driverless AI server.

experiment property

experiment: Experiment

Diagnosed experiment by the model diagnostic.

Returns:

key property

key: str

Universally unique key of the entity.

Returns:

metric_plots property

Metric plots of the model diagnostic.

Beta API

A beta API that is subject to future changes.

Returns:

name property

name: str

Name of the entity.

Returns:

scores property

scores: dict[str, dict[str, float]]

Scores of the model diagnostic.

Returns:

test_dataset property

test_dataset: Dataset

Test dataset that was used for the model diagnostic.

Returns:

delete

delete() -> None

Permanently deletes the model diagnostic from the Driverless AI server.

download_predictions

download_predictions(
    dst_dir: str = ".",
    dst_file: str | None = None,
    file_system: AbstractFileSystem | None = None,
    overwrite: bool = False,
    timeout: float = 30,
) -> str

Downloads the predictions of the model diagnostic as a CSV file.

Parameters:

  • dst_dir (str, default: '.' ) –

    The path where the CSV file will be saved.

  • dst_file (str | None, default: None ) –

    The name of the CSV file (overrides the default file name).

  • file_system (AbstractFileSystem | None, default: None ) –

    FSSPEC-based file system to download to instead of the local file system.

  • overwrite (bool, default: False ) –

    Whether to overwrite or not if a file already exists.

  • timeout (float, default: 30 ) –

    Connection timeout in seconds.

Returns:

  • str

    Path to the downloaded CSV file.

gui

gui() -> Hyperlink

Returns the full URL to the model diagnostic page in the Driverless AI server.

Returns:

  • Hyperlink

    URL to the model diagnostic details page.

ModelDiagnosticMetricPlots

Interact with the metric plots of a model diagnostic in the Driverless AI server.

actual_vs_predicted_chart property

actual_vs_predicted_chart: dict[str, Any] | None

Actual vs predicted chart for the model.

Returns:

  • dict[str, Any] | None

    An actual vs predicted chart in Vega Lite (v3) format, or None is the model is a classification model.

gains_chart property

gains_chart: dict[str, Any] | None

Cumulative gains chart for the model.

Returns:

  • dict[str, Any] | None

    A cumulative gains chart in Vega Lite (v3) format, or None is the model is a classification model.

ks_chart property

ks_chart: dict[str, Any] | None

Kolmogorov-Smirnov chart of the model.

Returns:

  • dict[str, Any] | None

    A Kolmogorov-Smirnov chart in Vega Lite (v3) format, or None is the model is a classification model.

lift_chart property

lift_chart: dict[str, Any] | None

Lift chart of the model.

Returns:

prec_recall_curve property

prec_recall_curve: dict[str, Any] | None

Precision-recall curve of the model.

Returns:

  • dict[str, Any] | None

    A precision-recall curve in Vega Lite (v3) format, or None is the model is a classification model.

residual_histogram property

residual_histogram: dict[str, Any] | None

Residual Histogram of the model diagnostic.

Returns:

  • dict[str, Any] | None

    A residual histogram in Vega Lite (v3) format.

residual_plot property

residual_plot: dict[str, Any] | None

Residual plot with LOESS curve of the model.

Returns:

roc_curve property

roc_curve: dict[str, Any] | None

ROC curve of the model.

Returns:

confusion_matrix

confusion_matrix(threshold: float = None) -> list[list[Any]] | None

Confusion matrix of the model.

Parameters:

  • threshold (float, default: None ) –

    The threshold value.

Returns:

  • list[list[Any]] | None

    A confusion matrix as a 2D list, or None is the model is a classification model