Ridge() method used by fit() supports sparse inputs by using scipy.sparse.linalg.cg as the solver. It would be nice to include this functionality in partial_fit(). On inspecting scipy.sparse.issparse(), it only checks the dtype of incoming data to determine sparsity so batching should not be a problem. As long as each of the batches maintains a consistent dtype (and I don't see a situation in which they wouldn't) this seems pretty safe.
Ridge()method used byfit()supports sparse inputs by usingscipy.sparse.linalg.cgas the solver. It would be nice to include this functionality inpartial_fit(). On inspectingscipy.sparse.issparse(), it only checks the dtype of incoming data to determine sparsity so batching should not be a problem. As long as each of the batches maintains a consistent dtype (and I don't see a situation in which they wouldn't) this seems pretty safe.