Quiz: Interpolation and Regression
Main.PythonQuiz15 History
Hide minor edits - Show changes to markup
(:title Quiz: Interpolation and Regression:) (:keywords quiz, test, Python, plot, interpolate, regression, curve fit, introduction, course:) (:description Learning assessment on interpolation and regression with Python.:)
1. Given the following data:
x, y 0, 2 1, 1
What is the predicted y value with a linear interpolation of the data at x=0.5?
(:div id=q1a:)
- Incorrect.
(:divend:)
(:div id=q1b:)
- Incorrect.
(:divend:)
(:div id=q1c:)
- Correct.
(:divend:)
(:div id=q1d:)
- Incorrect.
(:divend:)
2. What is a module for nonlinear regression in Python?
(:div id=q2a:)
- Incorrect. The polyfit function creates a polynomial regression of data.
(:divend:)
(:div id=q2b:)
- Correct. Scipy.optimize package has a minimize and curve_fit function for nonlinear regression. Gekko is another Python package for optimization and regression.
(:divend:)
(:div id=q2c:)
- Incorrect. Numpy does not have an optimization function.
(:divend:)
3. What is a Python function that can find solutions to nonlinear equations?
(:div id=q3a:)
- Incorrect. This package is used to create plots.
(:divend:)
(:div id=q3b:)
- Incorrect. Numpy is a base numerical Python package for other packages such as Scipy.
(:divend:)
(:div id=q3c:)
- Correct.
(:divend:)