2022-03-01 Regresión Lineal-Cómo y Cúando Usarla

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Regresión lineal: Cómo y cuándo

usarla

Diego Arizmendi

Data Science – Business Intelligence – Big Data – Machine Learning – Artificial Intelligence – Innovation and Technology
Algoritmos de Machine Learning

Tomado de: https://www.analyticsvidhya.com/blog/2021/03/everything-


you-need-to-know-about-machine-learning/

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Conjunto de entrenamiento y prueba

80% Training set

20% Test set

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Representación del modelo

Training set

Algoritmo de
aprendizaje
Valor de entrada Valor estimado por
Nuestra función h

x h y

Función que predice un valor de y dado un valor de x

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Proceso de modelamiento

Construimos el
algoritmo de
aprendizaje

Definimos el Entrenamos el Obtenemos un


Función h
training set algoritmo error

Definimos el
test set

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Introducción a la regresión lineal
Variable de
respuesta
(y) 𝑦 =𝑎 𝑥 +𝑏
Precio de los inmuebles

Pendiente Intercepto
con el eje y

Variable predictora
(x)

Tamaño de los inmuebles

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Mean Squared Error (MSE)

𝑛
1
𝑀𝑆𝐸 ( 𝑎 , 𝑏 )= ∑ ( 𝑦 − ( 𝑎 𝑥 +𝑏 ) )
(𝑖 ) (𝑖 ) 2

𝑛 𝑖=1

Loss function

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Mean Squared Error (MSE)

y(3) 𝑦 =𝑎 𝑥 +𝑏
y(1)
Precio de los inmuebles

y(2)

Tamaño de los inmuebles

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Loss function

𝐿(𝑤)
Función convexa

Mínimo

𝑤
(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com
Mean Squared Error (MSE)

y(3) 𝑦 =𝑎 𝑥 +𝑏
y(1)
Precio de los inmuebles

y(2)

Tamaño de los inmuebles

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Multiple Linear Regression

𝑓 ( 𝑥 )=𝑤 1 𝑥 1+𝑤 2 𝑥 2+…+ 𝑤 𝑛 𝑥 𝑛 +𝑏

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


Después de derivar

𝑤′ = ¿

(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com


(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com
(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com
(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com
(+51) 960 876 044 www.datayanalytics.com info@datayanalytics.com

You might also like