クラスAは5%下がってしまいましたが、クラスBは+10%、クラスCは+15%になりました。実は先程のmicro averageによる精度を計算すると、 5000×90% + 100×80% + 25×65% ÷ (5000+100+25) = 89.7% 5%近く下がっています。全体の精度が下がったほうが嬉しい、ちょっとおかしいですよね。 microとmacro この感覚のズレを解消するために、macro averageによる精度を計算します。macro averageとはクラス単位の精度を単純平均で求めます1。 前者:(95% + 70% + 50%) ÷ 3 = 71.7% 後者:(90% + 80% + 65%) ÷ 3 = 78.3% 直感と一致しました。microを使うか、macroを使うかは問題によりけりです。macro averageで集計するコンペもあります。不均衡データ対