Learning to Weight Parameters for Training Data Attribution