Get startedGet started for free

Feedback loops

In real-world ML applications, it's not enough to just deploy a model and forget about it. As the data evolves, so should the model. The feedback loop is a way of ensuring that the model is continuously learning and adapting to changing data. Imagine that your heart disease model has been in production for a few months. As part of continuous monitoring and improvement, you want to assess the model's current performance and determine the need for potential retraining or adjustments. balanced_accuracy_score is imported for you from sklearn.metrics, ks_2samp is imported from scipy.stats, and two samples of the models true_labels_feb and predicted_labels_feb for the current time period have been predefined. Finally jan_data_samples and feb_data_samples have been loaded.

This exercise is part of the course

End-to-End Machine Learning

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate and print the balanced accuracy of the model
balanced_accuracy_jan = 90.0
balanced_accuracy_feb = ____(____, ____) * 100
print(f"Model Balanced Accuracy In February: {____:.2f}%")
print(f"Is there a decline in accuracy? {'Yes' if ____ < ____ else 'No'}")
Edit and Run Code