Question: 2. Write a program to implement a 70-30 split for the Titanic train dataset. Use the following steps: a) Create a list of 891
2. Write a program to implement a 70-30 split for the Titanic train dataset. Use the following steps: a) Create a list of 891 random numbers and split it into two lists, one that contains 70% of the points and the other consisting of 30% of the points. The numbers should be between 1 and 891 with no duplicates. b) Use the pandas iloc method to create two subsets of the Titanic dataset using the two lists created in part (a). Note: You are not allowed to use scikit learns train_test_split function for this question.
Step by Step Solution
3.40 Rating (147 Votes )
There are 3 Steps involved in it
Solution Heres a program that implements a 7030 split for the Titanic train dataset python import pa... View full answer
Get step-by-step solutions from verified subject matter experts
