I have the below code to apply Tukey method on squared residual distances.
import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn