Change predict functions to write to matrix of histograms