def _getPredictedField(options):
 if ((not options['inferenceArgs']) or (not options['inferenceArgs']['predictedField'])):
  return (None, None)
 predictedField = options['inferenceArgs']['predictedField']
 predictedFieldInfo = None
 includedFields = options['includedFields']
 for info in includedFields:
  if (info['fieldName'] == predictedField):
   predictedFieldInfo = info
   break
 if (predictedFieldInfo is None):
  raise ValueError(("Predicted field '%s' does not exist in included fields." % predictedField))
 predictedFieldType = predictedFieldInfo['fieldType']
 return (predictedField, predictedFieldType)

def _getPredictedField ( options ) : if ( ( not options [ 'inferenceArgs' ] ) or ( not options [ 'inferenceArgs' ] [ 'predictedField' ] ) ) : return ( None , None ) predictedField = options [ 'inferenceArgs' ] [ 'predictedField' ] predictedFieldInfo = None includedFields = options [ 'includedFields' ] for info in includedFields : if ( info [ 'fieldName' ] == predictedField ) : predictedFieldInfo = info break if ( predictedFieldInfo is None ) : raise ValueError ( ( "Predicted field '%s' does not exist in included fields." % predictedField ) ) predictedFieldType = predictedFieldInfo [ 'fieldType' ] return ( predictedField , predictedFieldType )
gets the predicted field and its datatype from the options dictionary returns: .