Data Science, Linear Regression, Machine Learning, Python, Numpy.
range(self.n)]).reshape(1, self.n) return X, betas def yhat(self, X, betas): """ Method that takes in X and betas and returns the predicted values of y. Args: X: A matrix of shape (m, n+1) where m is the number of training examples and n is the number of features (with an additional column of ones