BaşlayınÜcretsiz Başlayın

Popularity for Observed Songs

Let's practice making predictions about song popularity from the Spotify songs data. This will get us used to the syntax we will use for making predictions for new data that was not observed.

Bu egzersiz

Bayesian Regression Modeling with rstanarm

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Estimate a model predicting popularity from song_age and artist_name
  • Print a summary of the estimated model
  • Create posterior distributions of the predicted scores for each song
  • Print the first 10 predicted scores for the first 5 songs

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Estimate the regression model
stan_model <- stan_glm(___, data = songs)

# Print the model summary
___(stan_model)

# Get posteriors of predicted scores for each observation
posteriors <- ___(stan_model)

# Print 10 predicted scores for 5 songs
___[___:___, ___:___]
Kodu Düzenle ve Çalıştır