July 2017
Intermediate to advanced
360 pages
8h 26m
English
There are situations when we need to find a regressor for a dataset of non-decreasing points which can present low-level oscillations (such as noise). A linear regression can easily achieve a very high score (considering that the slope is about constant), but it works like a denoiser, producing a line that can't capture the internal dynamics we'd like to model. For these situations, scikit-learn offers the class IsotonicRegression, which produces a piecewise interpolating function minimizing the functional:

An example (with a toy dataset) is provided next:
>>> X = np.arange(-5, 5, 0.1)>>> Y = X + np.random.uniform(-0.5, ...
Read now
Unlock full access