A linear model in the presence of outliers

In this recipe, instead of traditional linear regression we will try using the Theil-Sen estimator to deal with some outliers.

Get scikit-learn Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.