scikit-learn/scikit-learn — pull request #2932 by ajtulloch (2014-03-04 12:24:14+00:00)
Title: [Feature Selection] Fix SelectFDR thresholding bug (#2771)

From https://github.com/scikit-learn/scikit-learn/issues/2771, we were
not correctly scaling the alpha
parameter (http://en.wikipedia.org/wiki/False_discovery_rate#Benjamini.E2.80.93Hochberg_procedure)
with the number of features (== hypothesis). Thus, the alpha
parameter was not invariant with respect the number of features.

The correction is as suggested in the original issue, and a test has
been added that verifies that for various numbers of features, an
appropriate false discovery rate is generated when using the selector.

This test passes with the new FDR logic, and fails with the old FDR logic.