def METHOD_NAME(self) -> int:
    """
    Return the number of output classes.
    :return: Number of classes in the data.
    """
    if self._model.classes_ is not None:
        return len(self._model.classes_)
    return -1