Confusion Matrix and Cybercrime

Yash Agarwal
3 min readJun 6, 2021

In today's world, we are working with the advancement of technology but everything comes with a price, so even having good security, there is some vulnerability present that hackers can exploit to gain access to our systems by which we can lose our data or steal our data.

Here the main business is not how hackers gain access to our system but the main part is to whether we can predict that if our system is getting attack by the hacker or not by using some algorithm by which we can be better prepared for the solution and can perform some action according to it and but there is also a problem related to prediction which can be analysed to great extent using the confusion matrix

So What is Confusion Matrix?

Confusion is a n*n matrix(where n is the number of classes) that evaluate our machine learning model accuracy, precision and a lot more things about the model.

Confusion Matrix contains true values along with predicted values(which model predict) that it uses to find the holistic view of our model.

It comprises 4 different parts naming:-

  • True Positive(TP): It is the sum of all actually positive records + the records our machine learning model predicted it positive.
  • True Negative(TN): Likewise it the sum of all records of the actual negative + model predicted it negative.
  • False Negative(FN or Type II error): It is the sum of all records which actually positive but our model falsely predicted negative.
  • False Positive(FP or Type I Error): Similarly it is the sum of all records which model predicted positive but actually it belongs to negative class.

If we get more no of records in TN and TP then we have done great in creating our model but what about FP and FN what is the type I and type II error

Let's first talk about the error and the types of errors with examples of cyber attack.

Suppose we created a model which will inform us about if someone is hacking our system or not by using some machine learning algorithm.

Type I error: If our model predicted someone is attacking our system but actually it is not then in that case we encountered the type I error it is not that much dangerous as compared with type II.

Type II error: Let's suppose if some of the hackers are exploiting our system but our model predicted everything is safe no one is attacking our system then it is very dangerous as Hacker actually can access our database if we encountered this type of error.

From this we can see that ype II error is very much dangerous than type I error as in type I if we will take some false action then it not might create great impact but in type II not performing required actions might be very risky.

Conclusion:

There are numerous attacks which can be possible if we don't train our model well like stealing bank details, stealing details of customers from the company database, not only it is useful in cybersecurity but it is very helpful in the health sector where we deal with person’s life, in this case, we can’t take chance to predict any wrong prediction, therefore, we have to be very sure about correct evaluation o our model based on Confusion matrix.

So while creating the model we have to very cautious while dealing with the type II error or False Positive as if we predicted wrong could create a huge loss.

Thank you for reading this article!!

--

--