Predictions based on the clustering of heterogeneous functions via shape and subject-specific covariates