fit method

It will search for the best model based on the performances on
validation data.

Arguments

x: numpy.ndarray or tensorflow.Dataset. Training data x. The input data
should be numpy.ndarray or tf.data.Dataset. The data should be one
dimensional. Each element in the data should be a string which is a
full sentence.

y: numpy.ndarray or tensorflow.Dataset. Training data y. The targets
passing to the head would have to be tf.data.Dataset, np.ndarray,
pd.DataFrame or pd.Series. It can be single-column or multi-column.
The values should all be numerical.

epochs: Int. The number of epochs to train each model during the search.
If unspecified, by default we train for a maximum of 1000 epochs,
but we stop training if the validation loss stops improving for 10
epochs (unless you specified an EarlyStopping callback as part of
the callbacks argument, in which case the EarlyStopping callback you
specified will determine early stopping).

callbacks: List of Keras callbacks to apply during training and
validation.

validation_split: Float between 0 and 1. Defaults to 0.2.
Fraction of the training data to be used as validation data.
The model will set apart this fraction of the training data,
will not train on it, and will evaluate
the loss and any model metrics
on this data at the end of each epoch.
The validation data is selected from the last samples
in the x and y data provided, before shuffling. This argument is
not supported when x is a dataset.
The best model found would be fit on the entire dataset including the
validation data.

validation_data: Data on which to evaluate the loss and any model metrics
at the end of each epoch. The model will not be trained on this data.
validation_data will override validation_split. The type of the
validation data should be the same as the training data.
The best model found would be fit on the training dataset without the
validation data.

evaluate method

y: Any allowed types according to the head. Testing targets.
Defaults to None.

**kwargs: Any arguments supported by keras.Model.evaluate.

Returns

Scalar test loss (if the model has a single output and no metrics) or
list of scalars (if the model has multiple outputs and/or metrics).
The attribute model.metrics_names will give you the display labels for
the scalar outputs.