Fix data size calculation in ModelMetrics class to use target_data.shape[0] for improved accuracy in metrics processing.