def fit(self, Z, classes=None):
check_rdd(Z, {'<STR_LIT:X>': (sp.spmatrix, np.ndarray)})<EOL>self._classes_ = np.unique(classes)<EOL>return self._spark_fit(SparkLogisticRegression, Z)<EOL>
Fit the model according to the given training data.

        Parameters
        ----------
        Z : DictRDD containing (X, y) pairs
            X - Training vector
            y - Target labels
        classes : iterable
            The set of available classes

        Returns
        -------
        self : object
            Returns self.