Implemented the fit method in linear regression.
Added appropriate messages to the example file for linear.