This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
homework:2013-py01 [2015/03/10 23:41] hongxin [Requirements] |
homework:2013-py01 [2023/08/19 21:02] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Homework 01 ====== | ||
+ | |||
+ | ===== Goal ===== | ||
+ | Implement polynomial curve fitting in python. | ||
+ | |||
+ | 1. sample the function curve of y=sin(x) with Gaussian noise | ||
+ | {{ :homework:curve-fitting-d3.png?300 |}} | ||
+ | |||
+ | 2. fit degree 3 and 9 curves in 10 samples | ||
+ | {{ :homework:curve-fitting-d9.png?300 |}} | ||
+ | |||
+ | 3. fit degree 9 curves in 15 and 100 samples | ||
+ | {{ :homework:curve-fitting-d9s15.png?300 |}} | ||
+ | {{ :homework:curve-fitting-d9s100.png?300 |}} | ||
+ | |||
+ | |||
+ | 4. fit degree 9 curve in 10 samples but with regularization term | ||
+ | {{ :homework:curve-fitting-d9s10r.png?300 |}} | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | - Programming lanuage: python | ||
+ | - Plot the results in [[http://matplotlib.org/|matplotlib]] | ||
+ | |||