use a map to track the features whose weights need to be udpated