適合率、再現率、F1
理解しておくべきトレードオフ
「適合率、再現率、F1」はCoddyKit上の無料NLP Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはNLP Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 NLP Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Beyond One Number
To see past accuracy you split results into four buckets per class. From them come precision, recall, and F1, the metrics that matter.
The Positive Class
Pick the class you care about as positive, like spam or fraud. Precision and recall both describe how well you handle that class.
Precision: Trust the Alarms
Precision asks: of everything you flagged as positive, how many truly were? High precision means few false alarms.
Recall: Catch Them All
Recall asks: of all the real positives, how many did you catch? High recall means few misses slip through.
The Tug of War
Precision and recall usually trade off. Flag more items and recall rises but precision drops; flag fewer and the reverse happens.
Which One First?
Spam filters favor precision, since wrongly trashing real mail is costly. Cancer screens favor recall, since a missed case is far worse.
F1: One Balanced Score
The F1 score blends precision and recall into one number using their harmonic mean, rewarding models that do both well.
Why Harmonic Mean
F1 uses the harmonic mean so a model cannot fake it. If either precision or recall is near zero, F1 stays low too.
See Them in Python
scikit-learn prints all three at once with a tidy classification report you can scan per class.
from sklearn.metrics import classification_report
print(classification_report(y_true, y_pred))Get One Metric Alone
You can also pull a single metric directly when you only need F1 for the positive class.
from sklearn.metrics import f1_score
f1 = f1_score(y_true, y_pred)Pick by the Cost
No metric is best everywhere. Choose precision, recall, or F1 by the real-world cost of each mistake in your problem.
Quick Check
Match the metric to the question it answers.
Recap
Precision limits false alarms, recall limits misses, and F1 balances both. Let the cost of each error pick your metric. 📊
よくある質問
「適合率、再現率、F1」レッスンは無料ですか?
はい。「適合率、再現率、F1」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、NLP Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 NLP Academyコースには全4レッスンが含まれています。
「適合率、再現率、F1」で何を学びますか?
理解しておくべきトレードオフ ブラウザで直接実行するハンズオンコードでNLP Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
NLP Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのNLP Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。
「適合率、再現率、F1」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このNLP Academyレッスンでコードを書いて実行できますか?
はい。すべてのNLP Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 正解率が信頼できない理由
- 適合率、再現率、F1
- 混同行列を読み解く
- 交差検証を正しく行う