Confusion Matrix and Cyber crime

Yash Panchwatkar
2 min readJun 6, 2021

Task 05 πŸ‘¨πŸ»β€πŸ’»

Task Description πŸ“„

πŸ“Œ Create a blog/article/video about cyber crime cases where they talk about confusion matrix or its two types of error.

What is confusion matrix??

A confusion matrix is a technique for summarizing the performance of a classification algorithm. A confusion matrix is a summary of prediction results on a classification problem.

The number of correct and incorrect predictions are summarized with count values and broken down by each class. It gives you insight not only into the errors being made by your classifier but more importantly the types of errors that are being made.

let’s understand the term used here

  • TP: (True Positive) Predicted values correctly predicted as actual positive
  • FP: (False Positive) Negative values predicted as positive
  • FN: (False Negative) Positive values predicted as negative
  • TN: (True Negative) Predicted values correctly predicted as an actual negative

What is cyber crime?

Cybercrime is criminal activity that either targets or uses a computer, a computer network or a networked device. Most, but not all, cybercrime is committed by cybercriminals or hackers who want to make money.

Types of cybercrime

Here are some specific examples of the different types of cybercrime:

  • Email and internet fraud.
  • Identity fraud (where personal information is stolen and used).
  • Theft of financial or card payment data.
  • Theft and sale of corporate data.

Type I error

This type of error can prove to be very dangerous. Our system predicted no attack but in real attack takes place, in that case no notification would have reached the security team and nothing can be done to prevent it. The False Positive cases above fall in this category and thus one of the aim of model is to minimize this value.

Type II error

This type of error are not very dangerous as our system is protected in reality but model predicted an attack. the team would get notified and check for any malicious activity. This doesn’t cause any harm. They can be termed as False Alarm.

We can use confusion matrix to calculate various metrics:

  1. Accuracy: The values of confusion matrix are used to calculate the accuracy of the model. It is the ratio of all correct predictions to overall predictions (total values) Accuracy = (TP + TN)/(TP + TN + FP + FN)

2. Precision: (True positives / Predicted positives) = TP / TP + FP

3. Recall: (True positives / all actual positives) = TP / TP + FN

4. Specificity: (True negatives / all actual negatives) =TN / TN + FP

5. Misclassification: (all incorrect / all) = FP + FN / TP + TN + FP + FN

!! Thank you for reading !!

--

--