MI calculation using the spike distance metric. A, Spike distance calculation examples. Left, To turn the top spike train into the bottom spike train, three spikes must be deleted. Right, To turn the top spike train into the bottom spike train, one spike must be deleted and two spikes shifted. This is the minimum-cost solution for all cost parameters q such that qτi < 2 ∀ i. When this condition is not met, the spike is deleted from its position in the top train and added to the corresponding spot in the bottom train, adding a distance of 2. B, Stimulus clustering with the SDM method. Each dot represents a spike train whose color denotes the stimulus played when the train was recorded. For each train, the average distance 〈d(i,j)〉 to each group of spike trains is calculated. The spike train is estimated to have come from the stimulus group to which the average distance is smallest. C, A confusion matrix counts the number of spike trains assigned to each stimulus class. When normalized by the total number of spike trains, this is the joint stimulus response matrix used to calculate the MI.