class_docstr: A default early stopping implementation which supports stopping based on thresholds
  or based on patience-based improvement.
  
  .. versionadded:: 1.1.0
class_docstr_tok: ["A","default","early","stopping","implementation","which","supports","stopping","based","on","thresholds","or","based","on","patience-based","improvement",".","..","versionadded",":",":","1.1.0"]
code: def add_to_history(self, epoch, measured_values):
      count = (self._history["epoch"] == epoch).sum()
      tuple_measured_values = (
          measured_values.get("train_acc", None),
          measured_values.get("train_loss", None),
          measured_values.get("val_acc", None),
          measured_values.get("val_loss", None),
      )
      return np.append(
          self._history,
          np.array(
              (epoch, count) + tuple_measured_values, dtype=self._dtype
          ),
      )
  
imports: import logging
  import numpy
  from abc import ABC
label_desc: Use image node_id 5 for calling the EarlyStopping obj's underlying member method code with example usage: obj.add_to_history(epoch, measured_values) and returns: np