2

I'm new at python sklearn. Since I moved to Python 3, my code starts to take more time to run RFECV... It passed from 5h to almost 15h to run several RFE CV. I found this link, but I guess that the case is different from mine: Why is Python 3 is considerably slower than Python 2?

Here is an example of the code:

for fs_method, fs_dict in fs_models.items():
    print(fs_method)
    pickle_dict[fs_method] = dict()
    pipe = pipeline_classifier(fs_dict['clf'])

for score in fs_scorers:
    print (score)
    feature_selector_cv = skf.RFECV(pipe,
                                    cv=kf,
                                    step=rfecv_step,
                                    scoring=score.replace('-', '_'),
                                    n_jobs=-1
                                    )
    feature_selector_cv.fit(X_train, y_train)

Can it be caused by different versions of sklearn?

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
Hrpereira
  • 21
  • 5

0 Answers0