finish linear regression and make broadcast array always smaller than distarray