Before you turn this problem in, make sure everything runs as expected. First, restart the kernel (in the menubar, select Kernel\(\rightarrow\)Restart) and then run all cells (in the menubar, select Cell\(\rightarrow\)Run All).

Make sure you fill in any place that says YOUR CODE HERE or “YOUR ANSWER HERE”, as well as your name and collaborators below:

NAME = ""
COLLABORATORS = ""

Researchers have suggested that the S-shaped logistic curve:

\(height = \frac{k}{1 + e^{a + b week}}\)

would be appropriate to represent this data. Use scipy.optimize.minimize to find the parameters \(k, a, b\) in this equation. Then, use the model to plot how tall the plants will be after 24 weeks.

Discuss whether you think the S-shaped logistic curve is justified for this problem compared to a simple line, and how your prediction of the height in 24 weeks might change if you chose another model.

import numpy as np
week = np.array([1, 2, 4, 6, 8, 10])
height = np.array([9, 15, 22, 33, 44, 52])

When you are done, download a PDF and turn it in on Canvas. Make sure to save your notebook, then run this cell and click on the download link.

%run ~/f23-06623/f23.py
%pdf