Discovering shared and individual latent structure in multiple time series