Extended Data Fig. 9: Generalized linear model (GLM) implementation and additional quantification.
From: A flexible hippocampal population code for experience relative to reward

a) Schematic of the Poisson GLM to predict deconvolved calcium activity from task and movement variables. Linear track position and reward-relative position are both transformed into cosine basis functions tiling the space in each set of coordinates (45 cosine bumps for the 45 10-cm spatial bins used). A binary representing whether reward was received on each trial (“rewarded”) is multiplied with the linear track position basis functions to represent the interaction between reward received and position. Speed, acceleration, and smoothed lick count are quantile-transformed into B-splines which smoothly tile the ranges within each animal. Trial identities are used to group data for the training, cross-validation, and test sets (see Methods). b) Quantification of model performance (fraction deviance explained [FDE] on test data) across all switch animals and cells. Inset shows the histogram on a logarithmic scale. Red dashed line, fit threshold of 0.15 FDE used to select neurons for further analysis. Number and percentage of cells, pooled across all switch days, that exceeded the threshold: 11935/73512 (16%) of all cells, 11605/35386 (33%) of place cells from n = 11 mice. c) Quantification of model performance within each animal, shown on a logarithmic scale. Number and percentage of cells exceeding the FDE threshold: m3: 1549/6661 (23%) of all cells, 1425/2765 (52%) of place cells; m4: 1346/7600 (18%) of all cells, 1283/3583 (36%) of place cells; m7: 75/7367 (1%) of all cells, 72/2488 (3%) of place cells; m11: 337/1325 (25%) of all cells, 331/831 (40%) of place cells; m12: 1412/9286 (15%) of all cells, 1386/4998 (28%) of place cells; m13: 132/4808 (3%) of all cells, 124/1304 (10%) of place cells; m14: 2335/5487 (43%) of all cells, 2303/4086 (57%) of place cells; m15: 1392/9129 (15%) of all cells, 1386/5266 (26%) of place cells; m17: 506/4879 (10%) of all cells, 503/1889 (27%) of place cells; m18: 2215/13255 (17%) of all cells, 2177/6503 (33%) of place cells; m19: 636/3715 (17%) of all cells, 615/1723 (36%) of place cells. d) Distributions of second-top predictors for each subset of cells according to their top predictor, based on relative contribution of each variable computed by the model ablation method. In (d, e): n = 11 mice, 4106 track-relative cells, 2122 reward-relative cells, 1748 non-RR remapping cells. e) Distributions of bottom predictor variables (minimum relative contribution) for individual cells within each subpopulation, shown as % of well-fit cells in the subpopulation. f) All reward-relative cells well-fit by the GLM, sorted by their relative contribution of reward-relative position. Each row (each cell) is normalized by the contribution of its top predictor (n = 2122 reward-relative cells, 11 mice).