incompatible with a model of adaptation in narrow frequency channels. The analysis shown in Fig. 9 used only a small part of the data – only data with Df = 44%, using the responses to only four out of the six conditions in which the tones were tested, and only half of the points. Furthermore, the parameters of the model were estimated suboptimally. In the rest of this section, we overcome these limitations. We first fitted a model to all the data of each recording site. As will be seen below, these models gave rather good fits to the data, but their error, although close to, was often larger than the best possible error. We reasoned that this bias had to do with the two conflicting requirements discussed above: the reduction in the responses to the Diverse-broad condition relative to the responses in the Deviant-alone condition, but the almost equality of the Diverse-broad and Deviant responses. We therefore removed each of the test conditions in its turn from the training set and refitted the models, using them to predict the responses in the left-out condition. As expected, removing either the Diverse-broad or the Deviant conditions resulted in the greatest changes in both the quality of the fit and in the estimated width of the adaptation channel, and also with the largest deviations between predictions and measured responses to the left-out conditions. We fitted the model separately in each individual recording site, using all the data recorded in that site, including all frequency pairs at all Dfs. The discrepancy between the model and the actual responses was measured by the squared differences between each of the measured responses and the model prediction of that response. These discrepancies were added over all the responses to each of the two frequencies in each of the six conditions (which differed in the probabilities of the tone, its accompanying tones in the sequence, and the frequency separation between these tones) in all the sets that were presented at that recording site (up to 48 different responses, since not all recording locations were tested with all conditions and Dfs). To account for the different number of stimulus presentations that were used to determine each response, each term was weighted: e2~ X wc(rc{mc)2, c where the sum is over up to 48 terms, rc is the measured response in each condition, mc is the model prediction for that condition, and wc is the weight (square root of number of stimulus presentations at that condition). The resulting total weighted squared error e2 between the model response and actual response was then minimized in the following way. For each value of s, the half width of the adaptation channel, e2 was minimized to produce the optimal A and B (using the fit function from the Matlab curve fitting toolbox). This made e2 into a function of s only. A one- dimensional search was used to find the value of s that minimized 2 e . We didn’t allow sto decrease below 0.05 or increase above 4.0. Cases in which sreached one of these boundaries were omitted from further analysis (7/91 LFP sites, 8%; and 6/43 MUA sites, 16%). All further analysis considers only recording sites in which the parameters were successfully estimated. The parameters A and B were also determined as part of the fitting process. The parameter A is a scale parameter which depends on the overall size of the responses. Since we applied the model to responses that were normalized, each to its correspond- ing deviant-alone responses in each set and frequency, A was expected to be, and indeed was, around 1, independently of Deviance Detection in Rat Auditory Cortex recording site and frequency. B was essentially equal to the normalized response to the standard, since the exponent in the defining formula of the model in that case is very close to 1. Neither parameter is further analyzed here. The model accounted reasonably well for the data, given its simplicity. Figure 10 plots the fitted responses against the measured responses for all the recording sites and all types of sequences. Clearly, the model qualitatively captured the main aspects of the data: the fitted values to the Deviant-alone, Diverse- broad and Deviant (in green, yellow and red, respectively) were larger than to the other conditions. Also, overall, the individual fitted values scattered around the diagonal, as they should. In order to judge the goodness of fit of the model more quantitatively, we compared the mean error of the model, e2, with the weighted sum of squared standard errors of the mean responses se2~ X wcsec2, c where the sum is over the same conditions as e2, wc denotes the same weights used in calculating e2, and sec is the standard error of the measured response, rc. This expression is an estimate of the error of the best possible model for the responses, in which the response to each condition is fitted by its observed mean value. Figure 11A shows the histograms of the ratios between the fit error,e2, and the sum of squared standard errors of the responses, for all the relevant recording sites. The curves plotted on top of the histograms show the average expected distribution of the same ratios under the assumption that the model error is the minimal possible: since these are ratios of variances, assuming approximate Gaussian distribution for the errors, they should roughly follow an F(n,n) distribution with n, the number of degrees of freedom being the number of responses that were fitted by the model in each site. The average of all the F distributions for the modeled sites, and the corresponding 95% critical value, should give a rule of thumb for the goodness of fit. For the LFP data, 61% of the cases had error ratio below the critical value of the average F distribution, and for the MUA data, 81% of the cases had error ratio below the critical value. Thus, this 3-parameter model fitted much of the data quite well, although it also showed a consistent bias. We were mostly interested in the estimated half-widths of the adaptation band, s. The distribution of s for the different sites is shown in Fig. 11B. For the LFP responses, the median of s was 0.27 octave, with interquartile range of 0.19 – 0.40 octave. For the MUA responses, the median was 0.29 octave, with an interquartile range of 0.21 – 0.43 octave. Thus, the model suggests that in as much as SSA is due to adaptation in narrow frequency channels, significant across-frequency adaptation should occur once the tones are within 1/3 octave of each other. Having established that the model produced a reasonable approximation to the data, we analyzed the fit in more details using the leave-one-out procedure described above. The general trends were similar for LFP and MUA data; the description below summarizes the main findings of the leave-one-out procedure, while leaving the interpretation to the Discussion. The fits in the leave-one-out conditions had bandwidths and errors that differed from those of the fit to the whole data. Figure 12A shows the distribution of ratios of the adaptation bandwidths in the leave-one-out models and in the models fitted to all the data. Removing the Deviant responses from the training data resulted in a consistent increase in the fitted bandwidth. An PLoS ONE | www.plosone.org 10 August 2011 | Volume 6 | Issue 8 | e23369