  Understanding how the physical properties of galaxies (e.g. their spectral
type or age) evolve as a function of redshift relies on having an accurate
representation of galaxy spectral energy distributions. While it has been known
for some time that galaxy spectra can be reconstructed from a handful of
orthogonal basis templates, the underlying basis is poorly constrained. The
limiting factor has been the lack of large samples of galaxies (covering a wide
range in spectral type) with high signal-to-noise spectrophotometric
observations. To alleviate this problem we introduce here a new technique for
reconstructing galaxy spectral energy distributions directly from samples of
galaxies with broadband photometric data and spectroscopic redshifts.
Exploiting the statistical approach of the Karhunen-Loeve expansion, our
iterative training procedure increasingly improves the eigenbasis, so that it
provides better agreement with the photometry. We demonstrate the utility of
this approach by applying these improved spectral energy distributions to the
estimation of photometric redshifts for the HDF sample of galaxies. We find
that in a small number of iterations the dispersion in the photometric
redshifts estimator (a comparison between predicted and measured redshifts) can
decrease by up to a factor of 2.
