0

OpenCVで機械学習機能を使用するのは初めてです。Boostアルゴリズムを使用しましたが、うまく機能すると思います。calc_errorただし、関数がエラータイプではなく、エラーのみを返すのはかなり面倒でした。私が意味したのは:

タイプI誤検知エラー、誤警報

また

タイプIIターゲットがありません

OpenCVはエラータイプも提供できますか?どうもありがとう。

4

1 に答える 1

0

テストインスタンスで使用predictし、すべてのテストインスタンスをループして、結果を真のクラスと比較し、タイプ1 /タイプ2のエラー(または精度と精度、機械学習でより一般的な関連概念)を自分で見つけます。

このアイデアを表現するいくつかの擬似コード:

true_positive = 0
false_positive = 0
true_negative = 0
false_negative = 0

For i in 1..N:
    test_instance = test_set[i]

    true_class = labels[i]
    predicted_class = predict(test_instance, ... )

    if true_class = True and predicted_class == True
        true_positive += 1
    elseif true_class == False and predicted_class == True
        false_positive += 1
    elseif true_class == True and predicted_class == False
        false_negative += 1
    elseif true_class == False and predicted_class == False
        true_negative += 1
    end

type_I_error = false_positive/N
type_II_error = false_negative/N
于 2013-03-27T11:22:56.470 に答える