Skip to content

mlquality

qoa4ml.probes.mlquality

Functions

classification_confidence(data, score=True)

Compute classification confidence from model output scores or logits.

timeseries_metric(model)

Retrieve all metrics from a Keras Sequential timeseries model.

Returns a mapping of metric_name -> value. Returns {} if model is not a Keras Sequential. Raises ImportError if TensorFlow is not installed.

training_loss(model)

Retrieve the training loss history from a Keras Sequential model.

Returns {"loss": [...]} on success, {} when the model is not a Keras Sequential, or {"Error": "..."} on an unexpected failure.

training_metric(model)

Retrieve the full training history from a Keras Sequential model.

Returns the Keras History.history dict on success, {} when the model is not a Keras Sequential, or {"Error": "..."} on failure.

training_val_accuracy(model)

Retrieve the validation accuracy history.

Returns {"val_accuracy": [...]} on success, {} when the model is not a Keras Sequential, or {"Error": "..."} on failure.

training_val_loss(model)

Retrieve the validation loss history.

Returns {"val_loss": [...]} on success, {} when the model is not a Keras Sequential, or {"Error": "..."} on failure.

ts_inference_loss(model)

Retrieve the loss metric from a timeseries model.

Returns {"loss": <value>} or {} if the model has no loss metric.

ts_inference_mae(model)

Retrieve the mean-absolute-error metric from a timeseries model.

Returns {"mae": <value>} or {} if the model has no MAE metric.

ts_inference_metric(model, name)

Retrieve a single inference metric by name; empty dict if absent.