[MF] Computing Derivatives for Data Cost Analitically