- Derive the equation for the posterior mean by expanding the square in the exponential for each i, collecting all similar power terms, and making a perfect square again. Note that the product of exponentials can be written as the exponential of a sum of terms.
For this exercise, we use the dataset corresponding to Smartphone-Based Recognition of Human Activities and Postural Transitions, from the UCI Machine Learning repository (https://archive.ics.uci.edu/ml/datasets/Smartphone-Based+Recognition+of+Human+Activities+and+Postural+Transitions). It contains values of acceleration taken from an accelerometer on a smartphone. The original dataset contains x, y, and z components of the acceleration and the corresponding timestamp values. For this exercise, we have used only the two horizontal components of the acceleration x and y. In this exercise, let's assume that the acceleration follows a normal distribution. Let's also assume a normal prior distribution for the mean values of...
You're reading from Learning Bayesian Models with R
The rest of the page is locked
You have been reading a chapter from
Learning Bayesian Models with RPublished in: Oct 2015Publisher: PacktISBN-13: 9781783987603
© 2015 Packt Publishing Limited All Rights Reserved