  We present ANNz2, a new implementation of the public software for photometric
redshift (photo-z) estimation of Collister and Lahav (2004), which now includes
generation of full probability distribution functions (PDFs). ANNz2 utilizes
multiple machine learning methods, such as artificial neural networks and
boosted decision/regression trees. The objective of the algorithm is to
optimize the performance of the photo-z estimation, to properly derive the
associated uncertainties, and to produce both single-value solutions and PDFs.
In addition, estimators are made available, which mitigate possible problems of
non-representative or incomplete spectroscopic training samples. ANNz2 has
already been used as part of the first weak lensing analysis of the Dark Energy
Survey, and is included in the experiment's first public data release. Here we
illustrate the functionality of the code using data from the tenth data release
of the Sloan Digital Sky Survey and the Baryon Oscillation Spectroscopic
Survey. The code is available for download at
https://github.com/IftachSadeh/ANNZ .
