constants

constants.input_nub_categorical_handler(variable, input_dataframe)
constants.input_nub_numeric_handler(variable, input_dataframe)
constants.input_nub_text_handler(variable, input_dataframe)

Create an input nub for text data, by:

  • Finding all derived variables. With a variable name and sequence length of 4, there would be 4 derived

variables, name_0 through name_4 - Creating an appropriately shaped input layer, embedding layer, and all future layers - Return both the input layer and last layer (both are necessary for creating a model)

Parameters:
  • variable (str) – Name of the variable
  • input_dataframe (pandas.DataFrame) – A dataframe, containing either the specified variable, or derived variables
Returns:

A tuple containing the input layer, and the last layer of the nub