我使用管道作为 的估计器GridSearchCV。效果很好。但是,如果我使用内存参数启用缓存并将其设置n_jobs为大于 1,cv_results_则 \ 的分数列NaN将在一秒钟内完成,而不是几分钟。
您是否无法使用缓存功能GridSearchCV或者我做错了什么?
gsCV = GridSearchCV(\n estimator=Pipeline(\n# memory=\'../Cache/AW1MP_N10_DIN276_Pipeline\', # not working if enabled\n steps=[\n (\'we\', FastTextTransformer()), \n (\'se\', AverageWordVectorTransformer()),\n (\'rf\', RandomForestClassifier())\n ]\n\n ),\n param_grid=[\n {\n \'we__min_count\': [5],\n \'we__size\': [64],\n \'we__window\': [5],\n \'we__min_n\': [3],\n \'we__max_n\': [6],\n \'rf__n_estimators\': [1, 2, 3, 4, 5, 10],# 25, 64, 128], # number of trees in forest\n \'rf__criterion\':[\'gini\'],#\'entropy\'], # split criterion\n \'rf__max_features\':[\'auto\'], # number of features per tree,\n \'rf__max_depth\':[4, 8, 16]#, …Run Code Online (Sandbox Code Playgroud)