Login using Social Account
     Continue with GoogleLogin using your credentials
So, as StratifiedShuffleSplit is a class, we will first need to create an object of it.
The syntax of creating an object in Python is-
obj_name = Class_name(parameters)
You can refer to Python classes and objects to understand classed and object better.
Create an object of class StratifiedShuffleSplit of name split_object with parameters specified as-
n_splits = 1 - We specify it as 1 because we don;t want to perform cross validation here. We only want to perform stratified split.test_size = 0.2 - To split our dataset in a 80:20 train:test ratio.random_state = 42- 42 is chosen arbitrarily.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Loading comments...