[SOLVED] CSE218 Assignment-Curve Fitting

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Curve-Fitting-8pikhv.zip (78.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
Rate this product

In this assignment, you are required to fit a number of curves on a given input data. The data will be input from a file named β€œdata.txt”. There will be an arbitrary number of lines in the file. Each line will contain two double values separated by a space. These two values together will form a point in (x,y) form. A sample input file is provided for your convenience. You are required to do the following tasks:

1. Plot the points on a graph.
2. Fit a first-order curve and plot it on the graph. Print values of relevant parameters for the curve and the corresponding value of correlation coefficient (​r​).
3. Fit a second-order curve and plot it on the graph. Print values of relevant parameters for the curve and the corresponding value of correlation coefficient (​r​).
4. Fit a third-order curve and plot it on the graph. Print values of relevant parameters for the curve and the corresponding value of correlation coefficient (​r​).

Special Notes:

1. Your code must be in Python3. You cannot use any library other than numpy and matplotlib. Please note that you are not allowed to use any library function (not even from numpy) for performing regression.
2. Plot all the curves and points in a single graph. Use appropriate scale, labels, legends, etc.

3. Printing values of parameters and coefficients should be to console or file, not on the graph. 3. The data.txt file provided to you is just a sample. Your code may be tested with a different data file with the same format.

  • Curve-Fitting-8pikhv.zip