Kök Ortalama Kare Hatası (RMSE)

R'de Supervised Learning: Regresyon

Nina Zumel and John Mount

Win-Vector LLC

Kök Ortalama Kare Hatası (RMSE) nedir?

$$ RMSE = \sqrt{\overline{(y-pred)^2}} $$

burada

  • $y - pred$: hata ya da artıklar vektörü
  • $\overline{(y-pred)^2}$: $(y-pred)^2$ değerlerinin ortalaması
R'de Supervised Learning: Regresyon

Konut Satış Fiyatı Modelinin RMSE'si

# Calculate error
err <- houseprices$prediction - houseprices$price
  • price: gerçek satış fiyatları sütunu (binlerde)
  • prediction: tahmin edilen satış fiyatları sütunu (binlerde)
R'de Supervised Learning: Regresyon

Konut Satış Fiyatı Modelinin RMSE'si

# Calculate error
err <- houseprices$prediction - houseprices$price

# Square the error vector
err2 <- err^2
R'de Supervised Learning: Regresyon

Konut Satış Fiyatı Modelinin RMSE'si

# Calculate error
err <- houseprices$prediction - houseprices$price

# Square the error vector
err2 <- err^2

# Take the mean, and sqrt it
(rmse <- sqrt(mean(err2)))
58.33908
  • $RMSE \approx 58.3$
R'de Supervised Learning: Regresyon

RMSE büyük mü küçük mü?

# Take the mean, and sqrt it
(rmse <- sqrt(mean(err2)))
58.33908
# The standard deviation of the outcome
(sdtemp <- sd(houseprices$price))
135.2694
  • $RMSE \approx 58.3$
  • $sd(price) \approx 135$
R'de Supervised Learning: Regresyon

Hadi pratik yapalım!

R'de Supervised Learning: Regresyon

Preparing Video For Download...