first and then transforming it in the same way, both produce the same result. However, it is not equivariant under affine transformations of both the predictor and response variables. Algorithms and implementation The median slope of a set of sample points may be computed exactly by computing all lines through pairs of points, and then applying a linear time median finding algorithm. Alternatively, it may be estimated by sampling pairs of points. This problem is equivalent, under projective duality, to the problem of finding the crossing point in an arrangement of lines that has the median -coordinate among all such crossing points. The problem of performing slope selection exactly but more efficiently than the brute force quadratic time algorithm has been extensively studied in computational geometry. Several different methods are known for computing the Theil–Sen estimator exactly in time, either deterministically or using randomized algorithms. Siegel's repeated median estimator can also be constructed in the same time bound. In models of computation in which the input coordinates are integers and in which bitwise operations on integers take constant time, the Theil–Sen estimator can be constructed even more quickly, in randomized expected time . An estimator for the slope with approximately median rank, having the same breakdown point as the Theil–Sen estimator, may be maintained in the data stream model (in which the sample points are processed one by one by an algorithm that does not have enough persistent storage to represent the entire data set) using an algorithm based on ε-nets. In the R statistics package, both the Theil–Sen estimator and Siegel's repeated median estimator are available through the mblm library. A free standalone Visual Basic application for Theil–Sen estimation, KTRLine, has been made available by the US Geological Survey. The Theil–Sen estimator has also been implemented in Python as part of the SciPy and scikit-learn libraries. Applications Theil–Sen estimation has been applied to astronomy due to its ability to handle censored regression models. In biophysics, suggest its use for remote sensing applications such as the estimation of leaf area from reflectance data due to its "simplicity in computation, analytical estimates of confidence intervals, robustness to outliers, testable assumptions regarding residuals and ... limited a priori information regarding measurement errors". For measuring seasonal environmental data such as water quality, a seasonally adjusted variant of the Theil–Sen estimator has been proposed as preferable to least squares estimation due to its high