least-square-ma