Skip to content

hesam2801/F1Score

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

F1 Score Calculator

This repository contains a Python implementation for calculating the F1 score and other classification metrics. It analyzes true positives, false positives, true negatives, and false negatives from binary classification data, providing insights into model performance. Suitable for data scientists and machine learning enthusiasts.

Features

  • Calculation of True Positives (TP)
  • Calculation of False Positives (FP)
  • Calculation of True Negatives (TN)
  • Calculation of False Negatives (FN)
  • Metrics: Accuracy, Precision, Recall, and F1 Score

Formulas

  • Accuracy: $\text{Accuracy} = \frac{TP + TN}{TP + FP + TN + FN}$

  • Precision: $\text{Precision} = \frac{TP}{TP + FP}$

  • Recall: $\text{Recall} = \frac{TP}{TP + FN}$

  • F1 Score: $\text{F1 Score} = 2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}$

Usage

  1. Clone the repository:
    git clone https://github.com/hesam2801/F1Score.git
    
  2. Navigate to the directory:
    cd F1Score
  3. Run the script:
    python main.py

Requirements

  • Python 3.x
  • NumPy

License

This project is licensed under the MIT License.

Feel free to modify any sections as needed!

About

This repository contains a Python implementation for calculating the F1 score and other classification metrics. It analyzes true positives, false positives, true negatives, and false negatives from binary classification data, providing insights into model performance. Suitable for data scientists and machine learning enthusiasts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages