Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 / Vraag 4 You have a dataset containing 4 measured parameters of wine, namely acidity, sugar, sulphates and alcohol content. Each wine also

Question 4/Vraag 4
You have a dataset containing 4 measured
parameters of wine, namely acidity, sugar,
sulphates and alcohol content. Each wine also
has a quality score between 0 and 10, based on
a professional tasting You wish to use muitiple
linear regression to predict the score of a wine,
for a given set of these parameters.
(a) The first wine in the dataset has
{7.4,1.9,0.56,9.4} for the four pa-
rameters listed above. It has a quality
score of 5. The second wine in the dataset
has {11.2,1.9,0.58,9.8} for the same
parameters, and has a quality score of 6.
Write down the design matrix x(includ-
ing a bias term) and the target vector y for
just these two data points.
(b) Next, you read 4000 wines' data into the
design matrix. In your Python program
this is stored as a matrix variable X. You
have also read all the target values into
the vector variable y. Write Python-like
pseudocode to show how you would use
the normal equation to solve for the co-
efficients of the linear regression, w. It is
not necessary to write syntactically cor-
rect Python code, but it should be clear
from your solution what you are trying to
do.
(c) Assume that, after performing multiple
linear regression, you find that hat(w)=
{16.7,0.284,-0.518,-3.63,-0.727}. You
are given a new wine that has parameters
{6,1.9,0.57,9.5}. What would the pre-
dicted quality score for this wine be?
U het 'n datastel wat 4 gemete parameters vas
wyn beval, naamlik suurvlak, suiker, sulfate en
alkeholinhoud. Elke wyn het ook 'n kwaliteits -
punt tussen 0 en 10, gebaseet op 'is professio-
nele proesessie. U wil veelvuldige linere regres-
sie gebrulk om die kwaliteitspunt van 'n wyn te
voorspel, vir 'n gegewe stel van hierdie parame-
ters.
(a) Die cerste wyn in die datastel het
(7.4,1.9,0.56,9.4} vir die vier para-
meters wat hierbo gelys is. Dit het 'n
kwaliteitspunt van 5. Die tweede wyn in
die datastel het {11.2,1.9,0.58,9.8} vir
dieselfde parameters, en het 'n kwaliteits-
punt van 6. Skryf die ontwerpsmatriks X
(Instuitende die afsetterm) en die teiken-
vektor y vir net hierdie twee datapunte
nees.
(b) Volgende lees 44000 wyne se data in die
ontwerpsmatriks in. In u Python-program
word dit gestoor as 'n matriksverander-
like x. U het ook al die teikenwaardes in-
gelees in die vektorveranderlike y. Skryf
Python-styl-pseudokode om te wys hoe u
die normaalvergelyking sou gebruik om
op te los vir die koffisiente van die line-
re regressie, hat(w). Dit is nie nodig om sin-
takties korrekte Python-kode te skryf nie,
maar die moet duidelik wees vanuit u op-
lossing wat u probeer regkry.
(c) Aanvaar dat i na afloop van die
linere regressie vind dat hat(w)*=
16.7,0.284,-0.518,-3.63,-0.727.
U word 'n nuwe wyn gegee met para-
meters {6,1.9,0.57,9.5}. Wat sou die
voorspelde kwaliteitspunt vir hierdie wyn
wees?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

Students also viewed these Databases questions

Question

4. Choose appropriate and powerful language

Answered: 1 week ago

Question

2. Choose an appropriate organizational pattern for your speech

Answered: 1 week ago