original_docstring: Filters the keys given in input_data checking against the
          objective fields in the time-series model fields.
          If `full` is set to True, it also
          provides information about the fields that are not used.
  
          
docstring: Filters the keys given in input_data checking against the
  objective fields in the time-series model fields.
  If `full` is set to True, it also
  provides information about the fields that are not used.
docstring_tokens: Filters the keys given in input_data checking against the objective fields in the time - series model fields . If ` full ` is set to True it also provides information about the fields that are not used .
code: def filter_objectives(self, input_data,
                            full=False):
          """Filters the keys given in input_data checking against the
          objective fields in the time-series model fields.
          If `full` is set to True, it also
          provides information about the fields that are not used.
  
          """
  
          unused_fields = []
          new_input = {}
          if isinstance(input_data, dict):
              for key, value in list(input_data.items()):
                  if key not in self.fields:
                      key = self.inverted_fields.get(key, key)
                  if key in self.input_fields:
                      new_input[key] = value
                  else:
                      unused_fields.append(key)
  
              # raise error if no horizon is provided
              for key, value in list(input_data.items()):
                  value = self.normalize(value)
                  if not isinstance(value, dict):
                      raise ValueError( \
                          "Each field input data needs to be specified "
                          "as a dictionary. Found %s for field %s." % ( \
                              type(value).name, key))
                  if REQUIRED_INPUT not in value:
                      raise ValueError( \
                          "Each field in input data must contain at"
                          "least a \"horizon\" attribute.")
                  if any(key not in SUBMODEL_KEYS for key in \
                          list(value.get("ets_models", {}).keys())):
                      raise ValueError( \
                          "Only %s allowed as keys in each fields submodel"
                          " filter." % ", ".join(SUBMODEL_KEYS))
  
              result = (new_input, unused_fields) if full else \
                  new_input
              return result
          LOGGER.error("Failed to read input data in the expected"
                       " {field:value} format.")
          return ({}, []) if full else {}
code_tokens: def filter_objectives ( self , input_data , full = False ) : unused_fields = [ ] new_input = { } if isinstance ( input_data , dict ) : for key , value in list ( input_data . items ( ) ) : if key not in self . fields : key = self . inverted_fields . get ( key , key ) if key in self . input_fields : new_input [ key ] = value else : unused_fields . append ( key ) for key , value in list ( input_data . items ( ) ) : value = self . normalize ( value ) if not isinstance ( value , dict ) : raise ValueError ( "Each field input data needs to be specified " "as a dictionary. Found %s for field %s." % ( type ( value ) . name , key ) ) if REQUIRED_INPUT not in value : raise ValueError ( "Each field in input data must contain at" "least a \"horizon\" attribute." ) if any ( key not in SUBMODEL_KEYS for key in list ( value . get ( "ets_models" , { } ) . keys ( ) ) ) : raise ValueError ( "Only %s allowed as keys in each fields submodel" " filter." % ", " . join ( SUBMODEL_KEYS ) ) result = ( new_input , unused_fields ) if full else new_input return result LOGGER . error ( "Failed to read input data in the expected" " {field:value} format." ) return ( { } , [ ] ) if full else { }
short_docstring: Filters the keys given in input_data checking against the
  objective fields in the time-series model fields.
short_docstring_tokens: Filters the keys given in input_data checking against the objective fields in the time - series model fields .
comment: """Filters the keys given in input_data checking against the
          objective fields in the time-series model fields.
          If `full` is set to True, it also
          provides information about the fields that are not used.
  
          """$SEP$# raise error if no horizon is provided