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:
-
ModelDiagnostic
–Created model diagnostic.
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:
-
ModelDiagnostic
–The model diagnostic corresponding to the key.
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:
Returns:
-
Sequence[ModelDiagnostic]
–Model diagnostics.
ModelDiagnostic ¶
A model diagnostic in the Driverless AI server.
metric_plots
property
¶
metric_plots: ModelDiagnosticMetricPlots
Metric plots of the model diagnostic.
Beta API
A beta API that is subject to future changes.
Returns:
scores
property
¶
test_dataset
property
¶
test_dataset: Dataset
Test dataset that was used for the model diagnostic.
Returns:
-
Dataset
–
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.
ModelDiagnosticMetricPlots ¶
Interact with the metric plots of a model diagnostic in the Driverless AI server.
actual_vs_predicted_chart
property
¶
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
¶
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
¶
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 of the model.
Returns:
-
dict[str, Any] | None
–A lift chart in Vega Lite (v3) format, or
None
is the model is a classification model.
prec_recall_curve
property
¶
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_plot
property
¶
Residual plot with LOESS curve of the model.
Returns:
-
dict[str, Any] | None
–A residual plot in Vega Lite (v3) format, or
None
is the model is a classification model.
roc_curve
property
¶
ROC curve of the model.
Returns:
-
dict[str, Any] | None
–A ROC curve in Vega Lite (v3) format, or
None
is the model is a classification model