Use Theil-Sen estmiation for differntiation
The Theil-Sen estimation should be more robust in estimating the diverative as it is robust against outliers. See https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator
The Theil-Sen estimation should be more robust in estimating the diverative as it is robust against outliers. See https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator