A Bayesian Approach to Nonstationary Processes