code: private static Algorithm getAlgorithm(PMML pmml) throws PMMLConversionException {
          for (Extension extension : pmml.getExtensions()) {
              if (ALGORITHM_EXTENSION_ELEMENT.equals(extension.getName())) {
                  return Algorithm.valueOf(extension.getValue());
              }
          }
  
          throw new PMMLConversionException("Couldn't find '" + ALGORITHM_EXTENSION_ELEMENT + "' extension element in PMML.");
      }
docs: Retrieves the {@link com.feedzai.fos.impl.weka.utils.pmml.PMMLConversionCommons.Algorithm} represented
  as a PMML extension named {@link com.feedzai.fos.impl.weka.utils.pmml.PMMLConversionCommons#ALGORITHM_EXTENSION_ELEMENT}.
  
  @param pmml The {@link PMML}.
  @return The {@link com.feedzai.fos.impl.weka.utils.pmml.PMMLConversionCommons.Algorithm} in the PMML.
  @throws PMMLConversionException If it fails to retrieve the algorithm from the given PPML.