Supervised functional principal component analysis