Question: Create dataframe X with features passengers and distance. Create dataframe y with feature fare. Split the data into 7 0 % training, 2 0 %

Create dataframe X with features passengers and distance.
Create dataframe y with feature fare.
Split the data into 70% training, 20% validation and 10% testing sets, with random_state =42.
Initialize a linear regression model.
Fit the model with 15-fold cross-validation to the training data, using 'explained_variance' as the performance metric.
Print the explained variance for each fold.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!