EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
Python代写
您的位置: 主页 > 编程案例 > Python代写 >
代做Python:Big Data代写 Economics代写 Economics代写 Machine Learning代写 - Python代做
发布时间:2021-07-25 22:10:49浏览次数:
Assignment 3Big Data代写 Consider the two variables in the dataset Assign3.csv. We are interested in predicting the second variable Y given the first variable X.Machine Learning and Big Data for Economics and FinanceConsider the two variables in the dataset Assign3.csv.Big Data代写We are interested in predicting the second variable Y given the first variable X.Fit a linear regression model to the data. Show the data scatter plot on the samefigure with the values predicted by the linear model.Fit a quadratic regression model to the data. Show the data scatter plot on the same figure with the values predicted by the quadratic.We are interested in constructing a step function learner asfollows:First draw a random number U uniformly on the interval spanned by the minimum and maximum values of the inputs (x1; :::; xn) and then use it to construct the following function whose purpose is to give the prediction of Y given X = x:f(x) = a1I(U 6 x) + a2I(U x);Big Data代写 where a1 and a2 are just unknown constants to be learned. It goes without saying that I(some statement) is the indicator function that equals 1 when the statement is true and 0 otherwise.a.Usetwo  different  methods  to  compute the  estimate  f^(x) = a^1I(U 6x)+a^2I(U   x).  Is f^ a strong learner?b.Use one of the previous two methods to write an Rfunction that takes as input x and the data (x1; :::; xn; y1; :::; yn) and gives as output f^(x).Make sure the function is capable of dealing with the case where x conatains more than one number.Big Data代写c.Usingthree different runs of the previous function, create three dif- ferent plots where, on each, f^ is shown together with the scatter plot of theBig Data代写4.Write an R function that applies boosting to the previous step function learner.Big Data代写That R function should take as inputs: the data, B the number of boosting iterations, L the learning rate and an optional argument indicating thesize of the test subsample in case a validation set approach is needed.As output the function should give:  f^boost  the boosted learner evaluatedat the training data and the training mean squared error evaluated for each iteration b = 1; :::; B of the boosting algorithm. Also, in case the size of the test subsample is greater than zero, the function should output:  f^boost  evaluated at the test sample and the test MSE evaluated for each iteration b = 1; :::; B.Big Data代写a.Use that  function  to  plot  f^boost   on  top  of  the  data  scatter  plot  forL = 0.01 and for B = 10000. Show the same with different values of B.b.Plot the training MSE vs. the number ofc.Was there overfitting when B =10000?Big Data代写Even though the algoritNOTE:hm is described in detail in both the slides and textbook, for the sake of making the implementation easier, its special case per- taining to the questions in the assignment is presented here.Boosting algorithm:Inputs

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。