ניתוח נתונים ולמידת מכונה
אמית רננים – חלופה ליחידה 3
בואו נתחיל עם האלגוריתם הראשון:
Linear Regression
Some of the materials are with permission from
Jose Portilla, Ariel Bar Itzhak, Koby Mike
Introduction to Linear Regression = חיזוי משתנה רציף
2
אימון
דוגמאות
מודל
חיזוי מחיר בית לא ידוע
מאפיינים
מטרה
חיזוי מחיר בית
Introduction to Linear Regression
3
#1
#2
#3
Introduction to Linear Regression
4
סה"כ השקעה בשיווק
מכירות
Introduction to Linear Regression
5
Introduction to Linear Regression
בואו נחזה את רוחב העלה של אירוס על בסיס אורכו, לפי הפרמטרים הבאים:
w=0.416, b=-0.366
בעזרת נוסחת הייצוג:
6
Petal length | Petal width |
1.5 | |
2.5 | |
6.5 | |
0.5 | |
0 | |
What do you think about the values 0.5 and 0?
Introduction to Linear Regression
7
Introduction to Linear Regression
8
Introduction to Linear Regression
9
Features (X) Target (y)
x1 x2 x3 y
Introduction to Linear Regression
10
The y-hat symbol means that this is a prediction (not a perfect fit to y)
= Intercept ( = 1)
Introduction to Linear Regression
11
Introduction to Linear Regression
We define “best fit” as minimizing the squared error:
12
Introduction to Linear Regression
Let’s start with a simple Linear Regression (introduction notebook)
13