.. _book_fig_chapter8_fig_regression_mu_z: Cosmology Regression Example ---------------------------- Figure 8.2 Various regression fits to the distance modulus vs. redshift relation for a simulated set of 100 supernovas, selected from a distribution :math:`p(z) \propto (z/z_0)^2 \exp[(z/z_0)^{1.5}]` with :math:`z_0 = 0.3`. Gaussian basis functions have 15 Gaussians evenly spaced between z = 0 and 2, with widths of 0.14. Kernel regression uses a Gaussian kernel with width 0.1. .. image:: ../images/chapter8/fig_regression_mu_z_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_regression_mu_z.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_regression_mu_z.py :lines: 12- .. raw:: html
:download:`[download source: fig_regression_mu_z.py] ` .. raw:: html