There is an issue with the y = data['y'] definition 
There is an issue with the y = data['y'] definition