Recall & Review
beginner
What is polynomial fitting in data science?
Polynomial fitting is a method to find a polynomial curve that best matches a set of data points. It helps to model relationships that are not straight lines.
Click to reveal answer
beginner
Which function in scipy is commonly used for polynomial fitting?
The function
numpy.polyfit is used to fit a polynomial of a specified degree to data points.Click to reveal answer
beginner
What does the degree parameter in polynomial fitting control?
The degree parameter controls the highest power of the polynomial. For example, degree 2 fits a quadratic curve, degree 3 fits a cubic curve, and so on.
Click to reveal answer
intermediate
How do you evaluate the fitted polynomial at new points after fitting?
You can use
numpy.polyval with the coefficients returned by numpy.polyfit to calculate the polynomial values at new x points.Click to reveal answer
intermediate
Why might a very high degree polynomial be a bad choice for fitting data?
A very high degree polynomial can fit the training data too closely, capturing noise instead of the true pattern. This is called overfitting and leads to poor predictions on new data.
Click to reveal answer
Which scipy function fits a polynomial to data points?
✗ Incorrect
scipy.polyfit is the function used to fit polynomials to data points.
What does a polynomial degree of 1 represent?
✗ Incorrect
Degree 1 means a linear curve, which is a straight line.
After fitting a polynomial, which function helps to calculate values at new points?
✗ Incorrect
numpy.polyval evaluates the polynomial at new x values using the coefficients.
What is a risk of using a very high degree polynomial for fitting?
✗ Incorrect
High degree polynomials can overfit, capturing noise instead of the true pattern.
Which of these is NOT a typical use of polynomial fitting?
✗ Incorrect
Polynomial fitting is not used for sorting data points.
Explain how polynomial fitting works and why you might use it.
Think about how a curve can follow data points better than a straight line.
You got /3 concepts.
Describe the steps to fit a polynomial to data using scipy and how to use the result.
Remember the two main functions: one to fit, one to evaluate.
You got /4 concepts.