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 training, validation and testing sets, with randomstate
Initialize a linear regression model.
Fit the model with fold crossvalidation to the training data, using 'explainedvariance' 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
