Machine-learning-based prediction of parameters of secondaries in hadronic showers using calorimetric observables