<jupyter_start><jupyter_text>Import the __`torch`__ package<jupyter_code>import torch as pt
pt.__version__<jupyter_output><empty_output><jupyter_text>Implement the `Scalar` class<jupyter_code><jupyter_output><empty_output><jupyter_text>Apply `Scalar` to linear regression<jupyter_code><jupyter_output><empty_output><jupyter_text>Make linear regression data<jupyter_code><jupyter_output><empty_output><jupyter_text>Implement the mean squared error calculation<jupyter_code><jupyter_output><empty_output><jupyter_text>Confirm that gradient descent reduces MSE<jupyter_code><jupyter_output><empty_output><jupyter_text>Compare the value of `w` to the analytical solution* the ordinary least squares solution is $ (X^TX)^{-1}X^Ty $<jupyter_code><jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup