Path: blob/master/notebooks/book1/01/linreg_poly_vs_degree.ipynb
1192 views
Kernel: Unknown Kernel
Setup
In [1]:
In [2]:
In [3]:
Out[3]:
[1.3333333333333333, 1.7777777777777777]
[1.5, 1.75, 1.75]
In [4]:
In [12]:
MSE vs degree
In [13]:
Out[13]:
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitVsDegree.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitVsDegree.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitVsDegree.pdf
Figure size: [3.5 2. ]
Plot fitted functions
In [7]:
Out[7]:
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree3.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree3.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree3.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20.pdf
Figure size: [3.5 2. ]
Plot residuals
In [8]:
Out[8]:
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1Residuals.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1Residuals.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1Residuals.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2Residuals.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2Residuals.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2Residuals.pdf
Figure size: [3.5 2. ]
Plot fit vs actual
In [9]:
Out[9]:
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTrain.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTrain.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTrain.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTest.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTest.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree1FitVsActualTest.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTrain.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTrain.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTrain.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTest.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTest.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2FitVsActualTest.pdf
Figure size: [3.5 2. ]
Replot fitted functions using larger x range (to show interpolation)
In [10]:
Out[10]:
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2_range21.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2_range21.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree2_range21.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14_range21.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14_range21.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree14_range21.pdf
Figure size: [3.5 2. ]
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/probml_utils/plotting.py:70: UserWarning: renaming /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20_range21.pdf to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20_range21.pdf because LATEXIFY is False
warnings.warn(
saving image to /teamspace/studios/this_studio/pyprobml/notebooks/figures/polyfitDegree20_range21.pdf
Figure size: [3.5 2. ]