0% found this document useful (0 votes)
23 views2 pages

Logistic Regression in Exam Prediction

The document outlines exercises for a Master’s level course in AI, focusing on linear and logistic regression. It includes tasks such as calculating metrics for a regression model, plotting data points, performing regression analysis, and using logistic regression to predict exam outcomes. Specific exercises involve predicting sales, exam scores based on study hours, and calculating probabilities of passing an exam based on study hours.

Uploaded by

nadjibdjellali9
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)
23 views2 pages

Logistic Regression in Exam Prediction

The document outlines exercises for a Master’s level course in AI, focusing on linear and logistic regression. It includes tasks such as calculating metrics for a regression model, plotting data points, performing regression analysis, and using logistic regression to predict exam outcomes. Specific exercises involve predicting sales, exam scores based on study hours, and calculating probabilities of passing an exam based on study hours.

Uploaded by

nadjibdjellali9
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

Master 1 AI Univ.

Blida 1
Module : ML & NN Computer science department

1st DW Series – Regression-


Exercise 1(linear regression)
Consider the following training set table for predicting the sales of the items.
Items (x) Sales (y)
I1 80
I2 90
I3 100
I4 110
I5 120

Consider two new items I6 and I7, whose actual values are: 80 and 75 respectively.
A regression model predict the values of the items I6 and I7 as: 75 and 85 respectively.
Find the following metrics: MSE, MAE, RMSE, RelMSE and CV.
Exercise 2 (linear regression)
A researcher is interested in understanding the relationship between the number of hours studied
(X) and the final exam scores (Y) for a group of students.

Hours Studied (X) Grade on Final (Y)


1 51
2 55
3 61
4 63
5 66
6 70
7 72
8 75
9 78
10 82

1. Plot the data points on a graph where the x axis represents the hours studied and the y axis
represents the exam score.
2. Perform a simple linear regression analysis to find the equation of the best fit line
The equation should be in the form: 𝑌 = 𝑏0 + 𝑏1 ∗ 𝑋 where:
o Y is the predicted exam score
o X is the number of hours studied
o b0 is the intercept

1/2
Master 1 AI Univ. Blida 1
Module : ML & NN Computer science department

o b1 is the slope
3. Use the regression equation to predict the exam score of a student who studied for 12 hours.
4. Use matrix form to find the regression equation.
Exercise 4 (logistic regression)
The following table represent the dataset of pass or fail in an exam for 5 students. Use logistic
regression as a classifier to answer the following questions.
Hours Study Pass(1)/Fail(0)
29 0
15 0
33 1
28 1
39 1

1. Calculate the probability of pass for the students who studied 33 hours.
2. At least how many hours student should study that makes he will pass the course with the
probability of more than 95%
Assume the model suggested by the optimizer for odds of passing the course is:
𝐥𝐨𝐠(𝒐𝒅𝒅𝒔) = −𝟔𝟒 + 𝟐 ∗ 𝒉𝒐𝒖𝒓𝒔

2/2

You might also like