Question
Your friend, Bob, wants to build a binary classier for his project. He has collected all the data and stored them into two Python arrays
Your friend, Bob, wants to build a binary classier for his project. He has collected all the data and stored them into two Python arrays X and Y for the inputs and the labels respectively. Assume that his dataset has 1,000 examples and each input has 2 features. 1. (2%) What should be the shape of X and the length of Y? 2. (2%) To train and test his model, Bob will use 700 examples for training and the remaining 300 examples for testing. So he splits his data using the following code: X_train, X_test = X[:700], X[700:] Y_train, Y_test = Y[:700], Y[700:] What may go wrong with his train/test split? Give an example of X and Y to illustrate your point.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started