introduction to machine learning and deep learning in listing - we generate the toy dataset by generating values equidistantly between - and as the input variable (xwe generate the output variable (ybased on where , is noise (random variationfrom normal distributionwith being the mean and being the standard deviation the code for this is presented in listing - and the data is plotted in figure - in order to simulate seen and unseen datawe use the first data points as seen data and treat the rest as unseen data that iswe build the model using only the first data points and use the rest for evaluating the model listing - generalization vs rote learning #import packages import matplotlib pyplot as plt import numpy as np #generate toy dataset np linspace(- , , signal noise numpy random normal( signal noise plt plot(signal,' ')plt plot( ,' 'plt plot(noise' 'plt xlabel(" "plt ylabel(" "plt legend(["without noise""with noise""noise"]loc plt show(#extract training from the toy dataset x_train [ : y_train [ : print("shape of x_train:",x_train shapeprint("shape of y_train:",y_train shape