Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1.  
  2. print("Total samples in our dataset is: {}".format(X.shape[0]))
  3.  
  4. def compute_cost(X, y, params):
  5. n_samples = len(y)
  6. h = X @ params
  7. return (1 / (2 * n_samples)) * np.sum((h - y) ** 2)
  8.  
  9.  
  10.  
  11. ************* Module lin_reg_another_implementation
  12. lin_reg_another_implementation.py:22:0: W0312: Found indentation with tabs instead of spaces (mixed-indentation)
  13. lin_reg_another_implementation.py:23:0: W0312: Found indentation with tabs instead of spaces (mixed-indentation)
  14. lin_reg_another_implementation.py:24:0: W0312: Found indentation with tabs instead of spaces (mixed-indentation)
  15. lin_reg_another_implementation.py:29:0: W0312: Found indentation with tabs instead of spaces (mixed-indentation)
  16. lin_reg_another_implementation.py:30:0: W0312: Found indentation with tabs instead of spaces (mixed-indentation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement