Source code for skmultilearn.base.mock

from .base import MLClassifierBase


[docs]class MockClassifier(MLClassifierBase): """A stub classifier""" def __init__(self): super(MockClassifier, self).__init__()
[docs] def fit(X, y): self.label_count = y.shape[1] return self
[docs] def predict(X): return csr_matrix(np.ones(shape=(X.shape[0], self.label_count), dtype=int))