Compute log prior weights