WEEK 3 C2_W2_Lab_3_Feature_Selection, rfe error

There is a bug in the lab - in the function run_rfe() RFE is instantiated as follows:

    # Wrap RFE around the model
    rfe = RFE(model, 20)

This produces an error:

TypeError: RFE.__init__() takes 2 positional arguments but 3 were given

In fact the second parameter of the RFE should be explicitly defined like that:

    rfe = RFE(model, n_features_to_select=20)

Which fixes the issue.

Thanks for reporting. The staff have been informed about your suggested fix.