Cost-aware retraining for machine learning | Synapse