2. Variational method (15 pts each, 30 points total) Fitting of a collection of the data points to a given functional form can be done using variational method. Say, the measured data points are...
3. (25 pts) Consider the data points: t y 0 1.20 1 1.16 2 2.34 3 6.08 ake a least squares fitting of these data using the model yü)- Be + Be-. Suppose we want to m (a) Explain how you would compute the parameters β | 1 . Namely, if β is the least squares solution of the system Χβ y, what are the matrix X and the right-hand side vector y? what quantity does such β minimize? (b)...
Question 7 /10 points Grads only NaiveBayes + Conditional Likelihood As you recall, the parameters Θ- u {ểnly} for the standard NaiveBayes model are trained generatively, to optimize (log) likelihood of the training data S {[x), y0]; Σ logP (y, x) argmax (x,y)ES Of course, we often later use this NaiveBayes model for the discriminative task of predicting y given x. This suggests it might make sense to, instead, seek the parameters that optimize the log conditional likelihood OMCL argmax...
3. (30 points) Let f(x) = 1/x and data points Zo = 2, x,-3 and x2 = 4. Note that you can use the abscissae to find the corresponding ordinates (a) (8 points) Find by hand the Lagrange form, the standard form, and the Newton form of the interpolating polynomial p2(x) of f(x) at the given points. State which is which! Then, expand out the Newton and Lagrange form to verify that they agree with the standard form of p2...
d 04 Question (2 points) See page 78 In addition to finding the optimal bundles given prices and income, utility maximization can be used to find individual demand functions at any prices and income. Setting up the problem and solving it are the same, except that the prices of each good and the income will be left in variable form (economists dub these parameters or exogenous variables). 1st attempt See Hint Suppose utility for an average consumer over food and...
can someone please help wtih this curve fitting in mathlab 2. Curve Fitting Some tests are run with a ball of a fixed mass dropped from a known height onto a spring that is compressed a measured amount. The data collected from several test runs is contained in a text file CompressionVersusHeight.txt which is available on CatCourses. Note that the data file can have any number of data points and any script that reads it should allow for that. A...
4. Suppose you are given an equation of the form F(x, y,z) 0. Then we can say that each of the variables is defined implicitly as a function of the others. 2 a) If F and z(x, y) are both assumed to be differentiable, fnd in terms of partial derivatives of F. b) Under similar assumptions on the other variables, find 4. Suppose you are given an equation of the form F(x, y,z) 0. Then we can say that each...
DI Question 2 1.5 pts Which situations allow the client main() in the file my_program.py to access a method name, say func(), alone, as in x-func) without dereferencing it using prepended name like modname.func or x = some object. func () or x-SomeClass.func() O func) is defined in some module, say, "modname.py" and modname is imported into my_program.py using: from modname import func() is an instance method or a class method in a class, say SomeClass, defined in the same...
Problem 3. (30 pts.) Let f(x) 32-1 (a) Calculate the derivative (the gradient) (r) and the second derivative (the Hessian) "() (4pts) (b) Using ro = 10, iterate the gradient descent method (you choose your ok) until s(k10-6 (11 pts) (c) Using zo = 10, iterate Newton's method (you choose your 0k ) until Irk-rk-1 < 10-6. (15 pts) Problem 4. (30 pts.) Let D ), (1,2), (3,2), (4,3),(4,4)] be a collection of data points. Your task is to find...
For this exercise we will run a regression using Swiss demographic data from around 1888. The sample is a cross-section of French speaking counties in Switzerland This data come with the R package datasets. The first step is to load the package into your current environment by typing the command libraryldatasets) in to the R console. This loads a number of datasets including one called swiss. Type help/swiss) in the console for additional details. The basic variable definitions are as...