LOO अनुमान की गणना
अब loo पैकेज का उपयोग अपने Spotify मॉडल पर करके अभ्यास करें ताकि आप तय कर सकें कि कौन‑सा मॉडल आपके डेटा पर सबसे अच्छा फिट बैठता है. songs डेटासेट पहले से लोड है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
rstanarm के साथ Bayesian Regression Modeling
अभ्यास निर्देश
song_ageसेpopularityकी भविष्यवाणी करने वाला मॉडल एस्टिमेट करें- 1 प्रेडिक्टर वाले इस मॉडल के लिए LOO एप्रॉक्सिमेशन प्रिंट करें
song_age,artist_name, और उनके इंटरैक्शन सेpopularityकी भविष्यवाणी करने वाला मॉडल एस्टिमेट करें- 2 इंडिपेंडेंट वैरिएबल वाले इस मॉडल के लिए LOO एप्रॉक्सिमेशन प्रिंट करें
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Estimate the model with 1 predictor
model_1pred <- ___(___ ~ ___, data = songs)
# Print the LOO estimate for the 1 predictor model
___(model_1pred)
# Estimate the model with both predictors
model_2pred <- ___(___ ~ ___ * ___, data = songs)
# Print the LOO estimates for the 2 predictor model
___(model_2pred)