feature_extractor() -> extractor

    Returns the feature extractor used to extract the positive and negative features.

    This feature extractor is stored to file during the :py:meth:`extract` method ran, so this function reads that file (from the ``feature_directory`` set in the constructor) and returns its content.

    **Returns:**

    ``extractor`` : :py:class:`FeatureExtractor`
      The feature extractor used to extract the features stored in the ``feature_directory``

def feature_extractor(self):
    """feature_extractor() -> extractor

    Returns the feature extractor used to extract the positive and negative features.

    This feature extractor is stored to file during the :py:meth:`extract` method ran, so this function reads that file (from the ``feature_directory`` set in the constructor) and returns its content.

    **Returns:**

    ``extractor`` : :py:class:`FeatureExtractor`
      The feature extractor used to extract the features stored in the ``feature_directory``
    """
    extractor_file = os.path.join(self.feature_directory, "Extractor.hdf5")
    if not os.path.exists(extractor_file):
      raise IOError("Could not found extractor file %s. Did you already run the extraction process? Did you specify the correct `feature_directory` in the constructor?" % extractor_file)
    hdf5 = bob.io.base.HDF5File(extractor_file)
    return FeatureExtractor(hdf5)