Help us understand the problem. What is going on with this article?

Borutaが使うCPUスレッド数を指定する(Python版)

はじめに

前回、R版の「Borutaが使うCPUスレッド数を指定する」を書いたが、Python版で同じことをしたいときの話

環境

  • Python 3.X
  • Boruta 0.3

やり方

Borutaのクラスにそのような引数はなかったため、Borutaに与える予測器側のスレッド数をn_jobsで指定する。

以下はコード断片である。Borutaに与えるRandomForestRegressorのn_jobsを指定している。
これをうまく調整することによって、Borutaで特徴選択中に他の作業が何もできないという事態は防ぐことができる。

rf = RandomForestRegressor(n_jobs=10, max_depth=5)
feat_selector = BorutaPy(rf, n_estimators='auto', verbose=3, random_state=100, max_iter=30)
feat_selector.fit(x, y)
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away