sklearn.feature_selection.VarianceThreshold.fit_transform

Here are the examples of the python api sklearn.feature_selection.VarianceThreshold.fit_transform taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: scikit-learn Source File: test_variance_threshold.py
Function: test_variance_threshold
def test_variance_threshold():
    # Test VarianceThreshold with custom variance.
    for X in [data, csr_matrix(data)]:
        X = VarianceThreshold(threshold=.4).fit_transform(X)
        assert_equal((len(data), 1), X.shape)