subject
Engineering, 18.11.2019 23:31 brusierlover8590

Develop a function in matlab or python for general linear least square regression with the prototype given below (in matlab): function [a, r2]=genreg(func, x,y) % generates a general regression curve and % plots the curve along with data points % [a, r2]=genreg(func, x,y) % input: % func: name of the function calculating the basis function (z) % x, y: data points % output: % a: regression curve coefficients % r2: coefficient of determination % calculate the regression curve coefficients (a) z=func(x); % calculate r2 % plot the regression curve along with the data end where the input argument func is a separate m-file function calculating the basis functions z1, . . , zm. test your function by fitting a second order polynomial y = a0 + a1x + a2x 2 to the following data. report your results for a0, a1 and a2 as well as the coefficient of determination (r 2 ). show a plot of the regression curve along with the data. x 0 1 2 3 4 5 y 2.1 7.7 13.6 27.2 40.9 61.1

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, aliceohern
The y form of iron is known as: a) ferrite b) cementite c) perlite d) austenite
Answers: 3
image
Engineering, 04.07.2019 18:10, anna22684
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
image
Engineering, 04.07.2019 18:10, DestyHilBan1183
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
image
Engineering, 04.07.2019 18:20, xcapo1x
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
You know the right answer?
Develop a function in matlab or python for general linear least square regression with the prototype...

Questions in other subjects:

Konu
Mathematics, 22.04.2021 05:20
Konu
Mathematics, 22.04.2021 05:20
Konu
Biology, 22.04.2021 05:20