2017-08-12 7 views
1

たとえば、リコールスコアを取得しようとすると、h2o ValueError:メトリックtprがありません

rf_model.recall() 

私はエラーを取得する:

h2o ValueError: No metric tpr 

私は、このような精度、AUC、精度とF1が、無リコールなどの他の指標を、得ることができる... これはおそらくバグです。

私が実行している場合:

from h2o.model.metrics_base import H2OBinomialModelMetrics as bmm 
reporter = bmm(rf_model.metric) 
rf_model.metric('recall') 

私が取得:

Could not find exact threshold 0.0; using closest threshold found 0.0. 

何が起こっていますか?

私はh2oバージョン 'h2o-3.15.0.3990'を実行しています。

私はH2Oのチュートリアルに続く:

https://github.com/h2oai/h2o-tutorials/blob/master/training/h2o_algos/src/py/decision_tree_ensembles.ipynb

と自分のデータセットを使用しての、私は上記のエラーを取得します。

助けが必要ですか?

また、h2oを使用して精度/リコール曲線をプロットするにはどうすればよいですか?あなたの第二の質問を皮切り

おかげ

+0

メーリングリストには投稿しないでください。(StackOverflowはこの種の質問のためのより良い場所です。) –

答えて

1

は、フローは精度/リコール曲線を持っている(と、それは対話です)。ローカルでh2oを実行している場合、フローは常に各ノードのポート54321で実行されます(http://127.0.0.1:54321)。

あなたのデータやモデルには興味深いことがあると思いますが、精度/リコールカーブを見ると明らかになります。

str(m)mはあなたのモデルです)を実行すると、すべてのモデルデータが表示されます。 [email protected][email protected]$thresholds_and_metric_scores$recallは、各しきい値のリコール番号を保持します。

Pythonオブジェクトの内部を調べる方法はまだできませんが、呼び出しは正しいです。私の簡単なテストでは(2-カテゴリの列挙列を持つアイリスデータセットが追加):

[[0.8160852636726422, 1.0]] 

をそして、私はすべての値をしたい場合、それはこのようなものになります。

m.metric("recall") 

を与えました:

mDL.metric("recall",thresholds=[x/100.0 for x in range(1,100)]) 

与える:

Could not find exact threshold 0.01; using closest threshold found 0.010396965719556233. 
Could not find exact threshold 0.02; using closest threshold found 0.016617060110009896. 
... 
Could not find exact threshold 0.92; using closest threshold found 0.9469528904679438. 
Could not find exact threshold 0.93; using closest threshold found 0.9469528904679438. 
Could not find exact threshold 0.94; using closest threshold found 0.9469528904679438. 
Could not find exact threshold 0.95; using closest threshold found 0.9469528904679438. 
Could not find exact threshold 0.96; using closest threshold found 0.9469528904679438. 
Could not find exact threshold 0.97; using closest threshold found 0.9760293572153097. 
Could not find exact threshold 0.98; using closest threshold found 0.9787491606489236. 
Could not find exact threshold 0.99; using closest threshold found 0.9909817370067531. 

[[0.01, 1.0], 
[0.02, 1.0], 
[0.03, 1.0], 
... 
[0.87, 1.0], 
[0.88, 1.0], 
[0.89, 0.9850746268656716], 
[0.9, 0.9850746268656716], 
[0.91, 0.9850746268656716], 
[0.92, 0.9850746268656716], 
[0.93, 0.9850746268656716], 
[0.94, 0.9850746268656716], 
[0.95, 0.9850746268656716], 
[0.96, 0.9850746268656716], 
[0.97, 0.9701492537313433], 
[0.98, 0.9552238805970149], 
[0.99, 0.8955223880597015]] 

(奇妙なことに、私のデータセットを完全に学んだので、それはあなたに起こったものと思われます)(私は愚かなことに、バイナリカラムを入力カラムの1つの関数として、ノイズなしで作成しました)

関連する問題