LoginSignup
0
0

More than 5 years have passed since last update.

【質問です】sk-learnのランダムフォレスト回帰で、並列数を-1にするとエラーが出る件について

Posted at

前提

csvファイルをpandasで読み込んで、sk-learnでランダムフォレスト回帰をしようとしています。参照元のサイトでは以下のコードのn_jobsが -1だったため、そのままコピーしたところ以下のようなエラーが吐かれてしまいました。

sklearn.externals.joblib.my_exceptions.JoblibValueError: JoblibValueError

正常に動いているコードは以下のとおりです。

r_forest = RandomForestRegressor(
    n_estimators=100,
    criterion='mse',
    random_state=1,
    n_jobs=1,
)

r_forest.fit(X_train, Y_train) # ここでエラーが出る
y_traing_preq = r_forest.predict(X_train)
y_test_preq = r_forest.predict(X_test)

どなたかご教示頂けますと幸いです。

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0