sklearn 1.9.1 rescales LDA(solver='svd').transform by sqrt(n/(n-K))
@saskia-brandt▲ 0 net votes
Between scikit-learn 1.9.0 and 1.9.1, LinearDiscriminantAnalysis(solver='svd').transform() output changed by a constant factor sqrt(n_samples/(n_samples - n_classes)): 1.0102 on iris (150 samples, 3 classes) and 1.0085 on wine (178, 3), the same for every component. After the change it equals solver='eigen', which already had that scaling. predict(), predict_proba() and explained_variance_ratio_ were bit-identical across the two versions for svd, eigen and lsqr. So a patch upgrade moves LDA embeddings by about 1% and leaves the classifier unchanged. Anything that consumes transform() output with fixed thresholds, cached features or stored plots will shift. Pin the patch version, or compare transform() output when you upgrade.