Flash Sale: Flat 70% + Addl. 25% Off on all Courses | Use Coupon DS25 in Checkout | Offer Expires In

  Enroll Now

End to End Project - Bikes Assessment - Basic - Train and Analyze the Models - Train Linear Regression Model

Train the Linear Regression Model on the 'Training' data set using cross-validation and calculate 'mean absolute error' and 'root mean squared error' (RMSE) for this model.

Display these scores using display_scores() function.

  • Create a LinearRegression instance, called lin_reg, using default constructor (without any arguments)

  • Call cross_val_score() function, to perform training and cross validation and to calculate the mean absolute error scores, by passing to it the following:

    LinearRegression object lin_reg
    trainingCols dataframe
    trainingLabels dataframe
    parameter cv with value 10 (cv=10)
    scoring parameter with value "neg_mean_absolute_error"
    lr_mae_scores = -cross_val_score(<<your code comes here>>)

No hints are availble for this assesment

Answer is not availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...