Confusion Matrix And CyberCrimes !!!!
Hello guys !!!!
Lets get out of confusion on Confusion matrix concept😒 by this article…..
Confusion Matrix — Not So Confusing!!!!
Have you been in a situation where you expected your machine learning model to perform really well but it sputtered out a poor accuracy? You’ve done all the hard work — so where did the classification model go wrong? How can you correct this?
There are plenty of ways to gauge the performance of your classification model but none have stood the test of time like the confusion matrix. It helps us evaluate how our model performed, where it went wrong and offers us guidance to correct our path.
What is a Confusion Matrix?
A Confusion matrix is an N x N matrix used for evaluating the performance of a classification model, where N is the number of target classes. The matrix compares the actual target values with those predicted by the machine learning model. This gives us a holistic view of how well our classification model is performing and what kinds of errors it is making.
- The target variable has two values: Positive or Negative
- The columns represent the actual values of the target variable
- The rows represent the predicted values of the target variable
But what’s TP, FP, FN and TN here🙄? ????
That’s the crucial part of a confusion matrix. Let’s understand each term below.
True Positive (TP)
- The predicted value matches the actual value
- The actual value was positive and the model predicted a positive value
True Negative (TN)
- The predicted value matches the actual value
- The actual value was negative and the model predicted a negative value
False Positive (FP) — Type 1 error
- The predicted value was falsely predicted
- The actual value was negative but the model predicted a positive value
False Negative (FN) — Type 2 error
- The predicted value was falsely predicted
- The actual value was positive but the model predicted a negative value
👻The most dangerous error is Type2 error , Bcoz it gives false prediction even though the actual values is true. For example In real scenerio if a man gets corona positive but the model predicts that the man gets corona negative🤷♀️ which destroys few more lives by predicting wrong.
Cyber Crimes…!!!
👉Cybercrime, also called computer crime, the use of a computer as an instrument to further illegal ends, such as committing fraud, , stealing identities, or violating privacy.
Common forms of cybercrime include:
- phishing: using fake email messages to get personal information from internet users;
- misusing personal information (identity theft);
- hacking: shutting down or misusing websites or computer networks;
- spreading hate and inciting terrorism
✨Use Case where Confusion Matrix concept used in Cyber Crimes prevention
Now-a-days many people are trapping into Cyberbullying and due to this many had lose their lives instead of taking preventive measures. So, Cyber safety is the foremost problem for all the security giants in the world.
Social Media Cyberbullying Detection using Machine Learning
This can consist of three main steps are Preprocessing, features extraction, and classification.
● Preprocessing: In the preprocessing step we clean the data by removing the noise and unnecessary text.
● Feature Extraction: The second step is the features extraction step. In this step, the textual data is transformed into a suitable format applicable to feed into machine learning algorithms. TFIDF and sentiment analysis is used in this step.
● Classification: The last step is the classification step where the extracted features are fed into a classification algorithm to train, and test the classifier and hence use it in the prediction phase.
It has used two classifiers, namely, SVM and Neural Network. Generally, the evaluation of classifiers is done using several evaluation matrices depends on the confusion matrix. Among those criteria are Accuracy, precision, recall, and f-score.
Accuracy = TP+TN/TP+TN+FP+FN
Precision = TP/TP+FP Recall = TP/TP+FN
F — Score = 2precisionrecall/precision+recall
Implementing this By using cyberbullying dataset from Kaggle which was collected and labeled we can detect the cyber bullying crime and
by giving alerts we can take preventive measures from trapping into it.
:)