In two dimension I have a set of points X = $\{x_1,..., x_N\}$. I want to fit two parallel lines to these points like $l_1$ and $l_2$ $$l_1 = p_1 + \lambda n^\perp$$ $$l_2 = p_2 + \lambda n^\perp$$ $$n^Tn=1$$
How can I solve such a problem analytically or approximately for a given importance weighting $w_i$'s.
$$\arg \max_{n,p_1,p_2} \sum_{i=1}^{N}w_i\min \left( \lVert(p_1-x_i)^Tn\rVert, \lVert(p_2-x_i)^Tn\rVert \right) $$
Note: The distances of points to lines are written in Euclidean norm for ease but it is not a constraint.
How about this?
Fitting one line is easy: shift the coordinates so that the average is the origin; treating the new coordinates as complex numbers, the desired line passes through the square roots of the sum of their squares.
You could then partition the sample points according to their signed distance from that line, and shift the first line by the average offset of each subgroup.