Compute Precision and Recall in MATLAB

This is a MATLAB code that computes the precision and recall between the true and predicted values of a classification problem.

現在この提出コンテンツをフォロー中です。

This is a MATLAB code that computes the precision and recall between the true and predicted values of a classification problem.
The code then defines the true and predicted values as two binary arrays y_true and y_pred.
Next, the code counts the number of true positives (tp), false positives (fp), and false negatives (fn) by comparing the elements of y_true and y_pred.
The code then computes the precision and recall as the ratio of true positives to the sum of true positives and false positives (for precision) and the sum of true positives and false negatives (for recall), respectively.
Finally, the code displays the precision and recall using the disp function.

引用

Mehdi Ghasri (2026). Compute Precision and Recall in MATLAB (https://jp.mathworks.com/matlabcentral/fileexchange/133137-compute-precision-and-recall-in-matlab), MATLAB Central File Exchange. に取得済み.

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.0.0