original_docstring: Feed a dataset into the model in order to train it.
docstring: Feed a dataset into the model in order to train it.
docstring_tokens: Feed a dataset into the model in order to train it .
code: def train_model(model, dataset, epochs, batch_size, label_name):
    """Feed a dataset into the model in order to train it."""
  
    # Split the dataset into features and label.
    features = {name:np.array(value) for name, value in dataset.items()}
    label = np.array(features.pop(label_name))
    history = model.fit(x=features, y=label, batch_size=batch_size,
                        epochs=epochs, shuffle=True)
  
    # Get details that will be useful for plotting the loss curve.
    epochs = history.epoch
    hist = pd.DataFrame(history.history)
    rmse = hist["mean_squared_error"]
  
    return epochs, rmse
code_tokens: def train_model ( model , dataset , epochs , batch_size , label_name ) : features = { name : np . array ( value ) for name , value in dataset . items ( ) } label = np . array ( features . pop ( label_name ) ) history = model . fit ( x = features , y = label , batch_size = batch_size , epochs = epochs , shuffle = True ) epochs = history . epoch hist = pd . DataFrame ( history . history ) rmse = hist [ "mean_squared_error" ] return epochs , rmse
short_docstring: Feed a dataset into the model in order to train it.
short_docstring_tokens: Feed a dataset into the model in order to train it .
comment: """Feed a dataset into the model in order to train it."""$SEP$# Split the dataset into features and label.
  $SEP$# Get details that will be useful for plotting the loss curve.
  