Cyber Security & the Confusion Matrix

Some facts & data related to Cybercrime & Cybersecurity:

What is Cybercrime?

Some common types of Cyber Attacks:

  • Denial-of-service (DoS) and distributed denial-of-service (DDoS) attacks
  • Malware
  • Zero-Day Exploit
  • SQL Injection
  • Man in the Middle (MitM) attack
  • Phishing & spear phishing attacks
  • Drive-by attack
  • Cross-site scripting
  • Eavesdropping attack
  • Business Email compromise

What is Cyber Security?

What is Confusion Matrix?

Let’s understand Confusion Matrix with a Cyberattack example:

  • True Positive: The model predicted 50 packets are safe, and they were actually safe. This was a right prediction as well as positive news for us.
  • True Negative: The model predicted 100 packets are malicious, and it was absolutely right. This was a right prediction but negative for us. Well, the security team got to know about the threat on time, which is a great thing.
  • False Negative: The prediction was that 5 packets are threatful but actually they were safe. This was a wrong prediction, well the security team has to waste unnecessary time but anyway there was no threat to the servers. This is also known as Type 2 Error.
  • False Positive: The model predicted that 10 packets are safe, but actually they were not. This is the most dangerous prediction, as the security team got no alert, but the server was in threat. This is also known as Type 1 Error.

What Confusion Matrix provides us:

  • Precision: Precision is used to calculate the model’s ability to classify positive values correctly. It is the true positives divided by the total number of predicted positive values.
  • Accuracy: Accuracy is used to find the portion of correctly classified values. It tells us how often our classifier is right. It is the sum of all true values divided by total values.
  • Sensitivity: It is used to calculate the model’s ability to predict positive values. It is the true positives divided by the total number of actual positive values.
  • Misclassification: It is the inability of the system to provide the right predictions. It can be calculated as 1 minus the accuracy OR sum of all the false values divided by the total values.

Conclusion:

Thankyou for reading, hope you got to learn something from this!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store