Using gamma regression for photometric redshifts of survey galaxies