scikit-learn/scikit-learn — pull request #3076 by msalahi (2014-04-16 21:25:15+00:00)
Title: Sparse bagging tests

Added a test each for BaggingClassifier and BaggingRegressor to train on dense/sparse versions of the same data with various input parameters, and make sure the outputs are equal. Constrained tests to just SVC/SVR models. It should be up to various models' tests to make sure they handle sparse data correctly. These tests should just make sure BaggingClassifier doesn't throw a wrench in the works along the way.

Did discover along the way that KNeighborsClassifier, and Perceptron don't throw exceptions on sparse data, but might not actually be able to handle it correctly. I'll take a look at these in more detail outside of this issue.