def fit(self, X, y):

        if LogisticRegression is None:
            raise RuntimeError("sklearn not available.")

        min_y = y.min()
        max_y = y.max()

        assert min_y == 0

        num_classes = max_y + 1
        assert num_classes > 1

        logistics = []

        for c in xrange(num_classes):

            logger.info('fitting class {0}'.format(c))
            cur_y = (y == c).astype('int32')

            logistics.append(LogisticRegression(C = self.C).fit(X,cur_y))

        return Classifier(logistics)
Fits the model to the given training data.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/models/independent_multiclass_logistic.py/IndependentMulticlassLogistic.fit