My apologies if this question makes no sense; I am trying to find an algorithm that can solve a linear system of equations. Unlike most problems like this- for this particular case, this algorithm does not need to find a solution set that solves the entire set of equations. It only needs to solve the MOST number of these equations. For example, if a given linear system has n equations, then the solution set returned by the algorithm should 'fit' the most possible number of equations in the system.
example: if there are N linear equations in a system S of linear equations, then the algorithm should return a solution set that solves m linear equations in S, where m<=N.
Based on what I have researched, none of the algorithms I know of will do this. (All of the ones such as Gauss elimination, least squares, etc.tries to solve the entire system). Hopefully I am just missing something and I can get pointed into the right direction. Thanks.