We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter3で重要度の高い順に特徴量の名前と重要度を出力している部分に誤りがあるように思います。
for feat in range(Features): print( "Feature: {}Importance: {:.5f}"\ .format(MalwareDataset.columns[2+Index[feat]].ljust(30), FI[Index[feat]]) )
「Index」という変数は、以下のようなフローでできていると思います。 ①SelectFromModelを使って重要度の大きい特徴量のみに削減した変数「X」でExtraTreeClassifierを学習(fit)。 ②ExtraTreeClassifierの特徴量の重要度をリスト形式で出力(FI)。 ③FIから重要度の高い順にインデックスを作成(Index)。 つまり、FIの次元、すなわち特徴量の個数は削減後のものという認識です。
一方で、MalwareDatasetは削減前の特徴量を持ったままです。
よって、削減前の要素数を持つMalwareDatasetに対して、削減後のインデックスを使って「MalwareDataset.colums[2+Index[feat]]」のように特徴量の名前を取得しようとしているので、間違った結果になるはずです。
The text was updated successfully, but these errors were encountered:
知らせてくださり、ありがとうございます!
確認した上で修正させていただきます!
Sorry, something went wrong.
No branches or pull requests
Chapter3で重要度の高い順に特徴量の名前と重要度を出力している部分に誤りがあるように思います。
「Index」という変数は、以下のようなフローでできていると思います。
①SelectFromModelを使って重要度の大きい特徴量のみに削減した変数「X」でExtraTreeClassifierを学習(fit)。
②ExtraTreeClassifierの特徴量の重要度をリスト形式で出力(FI)。
③FIから重要度の高い順にインデックスを作成(Index)。
つまり、FIの次元、すなわち特徴量の個数は削減後のものという認識です。
一方で、MalwareDatasetは削減前の特徴量を持ったままです。
よって、削減前の要素数を持つMalwareDatasetに対して、削減後のインデックスを使って「MalwareDataset.colums[2+Index[feat]]」のように特徴量の名前を取得しようとしているので、間違った結果になるはずです。
The text was updated successfully, but these errors were encountered: