0% found this document useful (0 votes)
84 views3 pages

Weights in Linear Regression Model

Predictive analysis

Uploaded by

kisu84127
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)
84 views3 pages

Weights in Linear Regression Model

Predictive analysis

Uploaded by

kisu84127
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

MODULE 1

1. Build a simple linear regression model using the least squares method to predict sales
based solely on the TV advertising budget. You are provided with a dataset containing
the advertising budget spent on TV, radio, and newspapers in the below table, along
with the resulting sales figures.
TV Budget (in Radio Budget (in Newspaper Budget (in Sales (in
$1000s) $1000s) $1000s) $1000s)
150 22 12 14
200 28 15 18
120 35 25 11
180 25 18 16
210 30 20 20
Predict the sale for TV budget of 310.
OR
Build a simple linear regression model using the least squares method to predict salary
of a person. Predict the salary for 8 years of experience
Years of Experience Salary (in $1000s)
1 50
2 55
3 60
4 65
5 70

2. Develop a multiple regression model to predict car prices using all available features.
A dataset from a car manufacturer includes information on car prices along with
features such as engine size, horsepower, weight, fuel efficiency, and brand.
Car Brand Engine Size (L) Horsepower Price (in $1000s)
A 2.0 150 25
B 3.0 200 30
C 1.5 100 20
D 2.5 175 27
E 3.5 250 35
Make prediction for 4.0, 300 of engine size and Horsepower respectively.
OR
TV Radio Newspaper Sales
230 37 69 22.1
44 39 45 10.4
17 45 69 9.3
151 41 58 18.5
180 10 58 12.9
Make prediction for 8, 30, 35 of TV, radio and newspaper respectively.

3. Apply a multiple output regression model to predict the scores for Mathematics and
Science simultaneously. You have a dataset containing a student's scores in different
subjects along with some predictors like study hours, attendance, and extra-curricular
activities. Make prediction on math score & science score, given study hrs 16,
attendance 87, extra-curricular activities 4hrs.
Study Hours Attendance Extra-Curricular Math Science
(per week) (%) Activities Score Score
(hours/week)

10 90 2 78 82
15 95 1 88 85
8 80 3 72 75
12 85 0 80 78
20 98 2 92 90
OR
Years of Education Level Salary (in $1000) Bonus (in $1000)
Experience (x1) (Years) (x2) (y1) (y2)
1 12 40 5
2 14 45 7
3 16 50 10
4 18 60 12
5 20 70 15
Predict the Salary and Bonus for an employee with 6 years of experience and 18
years of education

4. You have a dataset containing information on different types of iris flowers with
features like petal length, petal width, sepal length, and sepal width. Apply Linear
Discriminant Analysis to classify the species of the iris flowers.
Sepal Length Sepal Width Petal Length Petal Width Species
(cm) (cm) (cm) (cm)
5.1 3.5 1.4 0.2 Iris-setosa
6.7 3.1 4.7 1.5 Iris-versicolor
5.9 3.0 5.1 1.8 Iris-virginica
4.9 3.6 1.4 0.1 Iris-setosa
6.3 2.9 5.6 2.1 Iris-virginica

5. Build a logistic regression model to predict the likelihood of a customer responding to


the campaign. A marketing team wants to predict whether a customer will respond to a
promotional email campaign based on features like age, income, past purchase
behavior, and time spent on the website. Consider your own dataset.

MODULE 2
6. You are given a dataset containing information about house prices, including features
such as the number of rooms, square footage, location, and age of the house.
Number of Square Location Age of House House Price
Rooms Footage (Years) ($)
3 1500 Downtown 10 300,000
4 2000 Suburban 5 450,000
2 800 Rural 20 150,000
5 2500 Suburban 8 500,000
3 1800 Urban 15 350,000
Apply linear and logistic regression model.
i. Apply the Bayesian Information Criterion (BIC) to compare these models.
Explain how the BIC helps in selecting the most appropriate model for the given
problem, considering the trade-off between model fit and complexity.
ii. Compare the bias and variance of both models. Explain which model would be
more suitable for predicting house prices and why, based on the concepts of model
complexity, bias, and variance.
iii. Apply regularization (e.g., L1 or L2) to the logistic regression model. Analyze
how the effective number of parameters changes and explain how this impacts the
model's ability to generalize to new data.
iv. Apply the bootstrap method to estimate the variability of the model coefficients in
a logistic regression model. Explain how this method helps in assessing the
stability and confidence of your model parameters.
7. Identify the key steps involved in the bootstrap method and explain how it can be
used to estimate the accuracy of a model. How would you select and choose the
appropriate scenarios where bootstrapping differs from traditional resampling
techniques?
8. Identify how cross-validation helps in assessing a model's generalization ability and
choose the role it plays in preventing overfitting. Why is it essential to select an
appropriate cross-validation technique for model evaluation?

You might also like