original_docstring: Create encoding dict to be used by the GA for generate the indivs
      Parameters
          ----------
              architecture: str
                  Architecture configured in cfg
              backbone: str
                  Backbone configured in cfg
              features: list
                  List with all features to be selected by GA
          Returns
          -------
      
docstring: Create encoding dict to be used by the GA for generate the indivs
  Parameters
  
  str
  Architecture configured in cfg
  backbone: str
  Backbone configured in cfg
  features: list
  List with all features to be selected by GA
  Returns
docstring_tokens: Create encoding dict to be used by the GA for generate the indivs Parameters str Architecture configured in cfg backbone : str Backbone configured in cfg features : list List with all features to be selected by GA Returns
code: def create_encoding(architecture, backbone, features):
      """Create encoding dict to be used by the GA for generate the indivs
      Parameters
          ----------
              architecture: str
                  Architecture configured in cfg
              backbone: str
                  Backbone configured in cfg
              features: list
                  List with all features to be selected by GA
          Returns
          -------
      """
      ENCODING = {}
      NAME_FEATURES_SELECTION = {}
      if backbone == "GASearch":
          ENCODING.update(PARAMETERS_ARCHITECTURE["DEFAULT"])
  
          if architecture == "CNN" or architecture == "CNN/MLP":
              ENCODING.update(PARAMETERS_ARCHITECTURE["CNN"])
  
              # Create cnn layers
              for i in range(PARAMETERS_INTERVAL["MAX_CNN_LAYERS"]["value"]):
                  for key, value in PARAMETERS_ARCHITECTURE["LAYER"][
                      "CNN_LAYER"
                  ].items():
                      ENCODING[key + "_" + str(i)] = value
              ENCODING.pop("activate_cnn_0")
  
          # Create dense layers
          for i in range(PARAMETERS_INTERVAL["MAX_DENSE_LAYERS"]["value"]):
              for key, value in PARAMETERS_ARCHITECTURE["LAYER"][
                  "DENSE_LAYER"
              ].items():
                  ENCODING[key + "_" + str(i)] = value
          ENCODING.pop("activate_dense_0")
  
          if architecture == "MLP" or architecture == "CNN/MLP":
              ENCODING.update(PARAMETERS_ARCHITECTURE["MLP"])
  
      # Features selection
      for i, name in enumerate(features):
          ENCODING[f"feature_selection_{i}"] = "FEATURE_SELECTION"
          NAME_FEATURES_SELECTION[f"feature_selection_{i}"] = name
  
      return ENCODING, NAME_FEATURES_SELECTION
code_tokens: def create_encoding ( architecture , backbone , features ) : ENCODING = { } NAME_FEATURES_SELECTION = { } if backbone == "GASearch" : ENCODING . update ( PARAMETERS_ARCHITECTURE [ "DEFAULT" ] ) if architecture == "CNN" or architecture == "CNN/MLP" : ENCODING . update ( PARAMETERS_ARCHITECTURE [ "CNN" ] ) for i in range ( PARAMETERS_INTERVAL [ "MAX_CNN_LAYERS" ] [ "value" ] ) : for key , value in PARAMETERS_ARCHITECTURE [ "LAYER" ] [ "CNN_LAYER" ] . items ( ) : ENCODING [ key + "_" + str ( i ) ] = value ENCODING . pop ( "activate_cnn_0" ) for i in range ( PARAMETERS_INTERVAL [ "MAX_DENSE_LAYERS" ] [ "value" ] ) : for key , value in PARAMETERS_ARCHITECTURE [ "LAYER" ] [ "DENSE_LAYER" ] . items ( ) : ENCODING [ key + "_" + str ( i ) ] = value ENCODING . pop ( "activate_dense_0" ) if architecture == "MLP" or architecture == "CNN/MLP" : ENCODING . update ( PARAMETERS_ARCHITECTURE [ "MLP" ] ) for i , name in enumerate ( features ) : ENCODING [ f"feature_selection_{i}" ] = "FEATURE_SELECTION" NAME_FEATURES_SELECTION [ f"feature_selection_{i}" ] = name return ENCODING , NAME_FEATURES_SELECTION
short_docstring: Create encoding dict to be used by the GA for generate the indivs
  Parameters
short_docstring_tokens: Create encoding dict to be used by the GA for generate the indivs Parameters
comment: """Create encoding dict to be used by the GA for generate the indivs
      Parameters
          ----------
              architecture: str
                  Architecture configured in cfg
              backbone: str
                  Backbone configured in cfg
              features: list
                  List with all features to be selected by GA
          Returns
          -------
      """$SEP$# Create cnn layers$SEP$# Create dense layers$SEP$# Features selection