Question: HelloI want answer for my question. I have python code that I need to add train _ test _ split function plz help me (
HelloI want answer for my question. I have python code that I need to add traintestsplit function plz help me using my code in down
import numpy as npfrom sklearn.datasets import loaddiabetes diabetesX diabetesy loaddiabetes returnXy True
diabetesX:
diabetesy:
diabetesXshape
diabetesX diabetesX:npnewaxis,
diabetesXshape diabetesXtrain diabetesX:
diabetesXtest diabetesX: diabetesXtrain.shape
diabetesXtest.shape
diabetesytrain diabetesy:diabetesytest diabetesy: diabetesytrain.shape
diabetesytest.shape
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
