agent.train(
training_data,
epochs=400,
batch_size=100,
validation_split=0.2
)
Issue:
Here in Restaurant example, there is agent.train.
Epochs is the number of times the machine learning model will see each training example during the training. When training the model, we go through all the training stories and train the models, and we repeat that process for 400 times (or for 2 if you set it to that value).
Batch size is the number of examples we look at at the same time. So instead of looking at one example and updating the model, we will look at 100 examples and after that update the model once (instead of a hundred times) - this makes sure that outlier examples do not influence the model to much, as their influence as one of a hundred examples is a lot smaller as if we would have done a single update for that example.
Validation split is the percentage (so between 0 and 1, including both ends) of examples to put aside for testing the model. The percentage of examples put aside will not be used for training. Instead, once in a while during the training we evaluate the performance of the model on these examples. This is good practice, as it doesn't make to much sense to evaluate how good the model is on the training data, as the model already "knows" that data.
Most helpful comment
Epochs is the number of times the machine learning model will see each training example during the training. When training the model, we go through all the training stories and train the models, and we repeat that process for 400 times (or for 2 if you set it to that value).
Batch size is the number of examples we look at at the same time. So instead of looking at one example and updating the model, we will look at 100 examples and after that update the model once (instead of a hundred times) - this makes sure that outlier examples do not influence the model to much, as their influence as one of a hundred examples is a lot smaller as if we would have done a single update for that example.
Validation split is the percentage (so between 0 and 1, including both ends) of examples to put aside for testing the model. The percentage of examples put aside will not be used for training. Instead, once in a while during the training we evaluate the performance of the model on these examples. This is good practice, as it doesn't make to much sense to evaluate how good the model is on the training data, as the model already "knows" that data.