1. Implement and plot a simple linear regression for the above data, where the temperature is "x", and the length is "y" 2. Implement and plot a multiple linear regression "Polynomial regression" with different degrees. For example, Degree of 3: Y = Wix' + w>x? + w3x³ + Wa Where wa represents bias. *you can use normal equation to calculate 'W' as follow: W (X".X)1.(X".Y) Then calculate Y, Where Y = X.WT 3. Try degree of 2, 3, 5, and 8

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

In python 3 

We all know that when the temperature of a metal increases, it begins to expand. So,
we experimented with exposing a metal rod to different temperatures and recorded its
length as follows:
Temp 20 25 30 35 40 45 50 55 60 65
Length 0.5 1.8 5 6 6.2 6.5 7.8 9.4 9.8 10.9

Now do these requirments:

1) Implement and plot a simple linear regression for the above data, where the temperature is “x”, and the length is “y”


2)  Implement and plot a multiple linear regression "Polynomial regression" with different degrees.
For example, Degree of 3:
Y = w1x1 + w2x2 + w3x3 + w4
Where w4 represents bias.
*you can use a normal equation to calculate ‘W’ as follow:
W = (XT.X)-1.(XT.Y)
Then calculate Y, Where Y = X.WT 


3) Try degrees of 2, 3, 5, and 8

1. Implement and plot a simple linear regression for the above data, where the
temperature is "x", and the length is "y"
2. Implement and plot a multiple linear regression "Polynomial regression" with
different degrees.
For example, Degree of 3:
Y = wix' + w2x? + w3x³ + W4
Where wa represents bias.
*you can use normal equation to calculate 'W' as follow:
W= (X".X)1.(x".Y)
Then calculate Y, Where Y = X.WT
3. Try degree of 2, 3, 5, and 8
Transcribed Image Text:1. Implement and plot a simple linear regression for the above data, where the temperature is "x", and the length is "y" 2. Implement and plot a multiple linear regression "Polynomial regression" with different degrees. For example, Degree of 3: Y = wix' + w2x? + w3x³ + W4 Where wa represents bias. *you can use normal equation to calculate 'W' as follow: W= (X".X)1.(x".Y) Then calculate Y, Where Y = X.WT 3. Try degree of 2, 3, 5, and 8
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Temporal Difference Learning
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education