code: public void removeWorstFit() {
          // find the observation with the most error
          int worstIndex=-1;
          double worstError = -1;
  
          for( int i = 0; i < y.numRows; i++ ) {
              double predictedObs = 0;
  
              for( int j = 0; j < coef.numRows; j++ ) {
                  predictedObs += A.get(i,j)*coef.get(j,0);
              }
  
              double error = Math.abs(predictedObs- y.get(i,0));
  
              if( error > worstError ) {
                  worstError = error;
                  worstIndex = i;
              }
          }
  
          // nothing left to remove, so just return
          if( worstIndex == -1 )
              return;
  
          // remove that observation
          removeObservation(worstIndex);
  
          // update A
          solver.removeRowFromA(worstIndex);
  
          // solve for the parameters again
          solver.solve(y,coef);
      }
docs: Removes the observation that fits the model the worst and recomputes the coefficients.
  This is done efficiently by using an adjustable solver.  Often times the elements with
  the largest errors are outliers and not part of the system being modeled.  By removing them
  a more accurate set of coefficients can be computed.