Problem in result of (y_pred -y) in Linear Regression implementation
0xmatriksh opened this issue · comments
First of all self.w is shaped (n_features,) so the y_pred will be (n_samples,)
Since, y_pred shape is (n_samples,) and y shape is (n_samples,1) and when they subtract each other(y_pred-y) the dimension of the result is (n_samples,n_samples), whose dot product to X.T which is shaped (n_features,n_samples) gives result (n_features,n_samples) which was expected to be (n_features,).