Prestatie-inschatting

Monitoring Machine Learning in Python

Hakim Elakhrass

Co-founder and CEO of NannyML

De algoritmen

  • CBPE - confidence-based performance estimation
  • DLE - direct loss estimation
Monitoring Machine Learning in Python

Direct loss estimation

  • Voor regressietaken
  • Schat de verliesfunctie van het gemonitorde model
  • LGBM wordt gebruikt als extra model
  • NannyML ondersteunt regressiemetrieken zoals MAE, MSE en RMSE

 

De afbeelding toont hoe DLE werkt. Eerst komen productiedata binnen; op basis van voorspellingen en productiedata wordt de analysedataset gemaakt. Die gaat naar het extra model om de performance te voorspellen.

Monitoring Machine Learning in Python

DLE - code-implementatie

# Initialize the DLE algorithm
estimator = nannyml.DLE(
    y_true='target',
    y_pred='y_pred',
    metrics=['rmse'],
    timestamp_column_name='timestamp',
    chunk_period='d'
    feature_column_names=features,
    tune_hyperparameters=False
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
Monitoring Machine Learning in Python

Confidence-based performance estimation

  • Voor binaire en multiclass-classificatie

  • Gebruikt confidencescores om de verwarringsmatrix te schatten

  • Schat elke classificatiemetriek

 

De afbeelding toont hoe CBPE werkt. We geven de analysedataset aan CBPE en schatten de verwarringsmatrix. Op basis daarvan berekenen we andere classificatiemetrieken.

Monitoring Machine Learning in Python

CBPE - code-implementatie

# Initialize the CBPE algorithm
estimator = nannyml.CBPE(
    y_pred_proba='y_pred_proba',
    y_pred='y_pred',
    y_true='targets',
    timestamp_column_name='timestamp',
    metrics=['roc_auc'],
    chunk_period='d',
    problem_type='classification_binary',
)
# Fit the algorithm
estimator.fit(reference)
results = estimator.estimate(analysis)
Monitoring Machine Learning in Python

Resultaten

results.plot().show()

De resulterende grafiek toont de geschatte RMSE in de tijd.

Monitoring Machine Learning in Python

Laten we oefenen!

Monitoring Machine Learning in Python

Preparing Video For Download...