August 2018
Intermediate to advanced
522 pages
12h 45m
English
There are situations when we need to find a regressor for a dataset of non-decreasing points that 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 IsotonicRegression class, which produces a piecewise interpolating function, minimizing the following functional:

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