I was wondering if there's a function in Python that can find the best-fitted line (in 2D) or best-fitted plane (in 3D) of a set of data by least absolute deviation and while considering uncertainties of the points.
In fact, I have 3d points, which I want the best-fit plane of them. There is Weighted least square (WLS) fit function in both sklearn and statsmodel python libraries, and by putting q=0.5 in quantile regression of statsmodel I get the least absolute deviation. However, how can I have Weighted Least Absolute regression fit function?