0% found this document useful (0 votes)
15 views5 pages

Tutorial - Bayesian Regression and Classifier

The document consists of a tutorial with various questions related to matrix projections, likelihood functions, and data analysis using Python. It includes tasks such as demonstrating orthogonal projections, deriving posterior distributions, and implementing functions to analyze a dataset. Additionally, it requires curve fitting using Gaussian basis functions and computing gradients of quadratic functions.

Uploaded by

2024ume0261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Tutorial - Bayesian Regression and Classifier

The document consists of a tutorial with various questions related to matrix projections, likelihood functions, and data analysis using Python. It includes tasks such as demonstrating orthogonal projections, deriving posterior distributions, and implementing functions to analyze a dataset. Additionally, it requires curve fitting using Gaussian basis functions and computing gradients of quadratic functions.

Uploaded by

2024ume0261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Tutorial 2

Q1 : ( 5 points) :
Show that the matrix takes any vector v and projects it onto the
space spanned by the columns of Φ. Use this result to show that the least-squares
solution corresponds to an orthogonal projection of the
vector t onto the manifold S (space span by column of Φ)

Q2 : (15 points) a) [7.5 points] Show that the likelihood function given by

When multiplied by Gamma distribution conjugate prior

will result in a posterior of Gamma


Distribution.
b) [7.5 points] Consider the Posterior distribution obtained in a) of the form

.Please find and .

Q3 : [6 Points]
Q 4 : [5 Marks]. Use the following dataset
( https://s3-api.us-geo.objectstorage.softlayer.net/
cf-courses-data/CognitiveClass/ML0101ENv3/labs/china_gdp.csv )
and perform following operations :
1) Read the dataset in python
2) Implement sigmoid function and generate the output y from
the dataset x.
3) Plot the initial predictions against data points
b) [5 Marks] Try the same thing using the Gaussian Basis function.

Q 5 : [20 Points] Answer the following :

Q 6 : Answer the following :


Q7:

Q8:
Q 9 : [10 Points] Computes the gradient of the quadratic function of x
given the starting points x=[1,2,3] and then uses the result of the gradient to feed
the next iterations, with new points. Prints out the result of the function at each
iteration till 3rd run. Use Python script to print the results.

Q 10 : [10 Points] With given input and output relation


x = [-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1]
t = [-4.9, -3.5, -2.8, 0.8, 0.3, -1.6, -1.3, 0.5, 2.1, 2.9, 5.6]
Please fit a curve with M=4 Gaussian basis functions having unity variance.

Q 11 :
Q 12 :

You might also like