TrackCooccurrenceGraph update

Keep trakc of all computed values
Added head support to trainCooccurrenceGraph