<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Machine Learning</title>
    <link>https://moodle.uwtsd.ac.uk/mod/forum/view.php?f=26872</link>
    <description></description>
    <generator>Moodle</generator>
    <language>en</language>
    <copyright>(c) 2026 UWTSD Moodle</copyright>
    <image>
      <url>https://moodle.uwtsd.ac.uk/theme/image.php/learnr/core/1765381289/i/rsssitelogo</url>
      <title>moodle</title>
      <link>https://moodle.uwtsd.ac.uk</link>
      <width>140</width>
      <height>35</height>
    </image>
    <item>
      <title>Re: Confusion Matrix</title>
      <link>https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217838</link>
      <pubDate>Sun, 04 Jan 2026 13:01:50 GMT</pubDate>
      <description>by Deep Shaileshbhai Patel. &amp;nbsp;&lt;p&gt;&lt;div class=&quot;text_to_html&quot;&gt;1. Explain what each element of the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt;.  Why are these important to track in a model’s performance?&lt;br /&gt;
A &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; is a performance evaluation tool that compares the actual class labels with the predicted class labels produced by a classification model. It provides a detailed breakdown of correct and incorrect predictions, allowing deeper insight into how the model behaves rather than relying only on overall accuracy.&lt;br /&gt;
True Positive (TP) refers to cases where the model correctly predicts a positive instance. In the context of an intrusion detection system, this means an attack is present and the model successfully identifies it as an attack. Tracking true positives is important because it reflects the model’s ability to correctly detect real threats. A high TP count indicates strong detection capability, which is critical for maintaining system security.&lt;br /&gt;
True Negative (TN) represents instances where the model correctly predicts a negative class. For intrusion detection, this occurs when normal network traffic is correctly classified as normal. True negatives are important because they show how well the model avoids unnecessary alerts. A high TN rate ensures efficient system operation and reduces disruption caused by incorrect security warnings.&lt;br /&gt;
False Positive (FP) occurs when the model incorrectly predicts a positive class for an instance that is negative. In practice, this means normal traffic is wrongly flagged as an attack. False positives are important to track because they lead to false alarms, increasing the workload for security analysts and potentially causing alert fatigue. Too many false positives can reduce trust in the system.&lt;br /&gt;
False Negative (FN) occurs when the model fails to detect a positive instance and predicts it as negative. In intrusion detection, this means an actual attack goes undetected. False negatives are the most critical error in security-related applications because they represent missed attacks and potential breaches. Even a small number of false negatives can have serious consequences for system safety.&lt;br /&gt;
Tracking all elements of the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; is essential because they form the basis for key performance metrics such as accuracy, precision, recall, and F1-score. These metrics help evaluate not only how accurate the model is, but also how reliable and safe it is in real-world use. In security systems, analysing the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; ensures the model achieves a suitable balance between detecting threats and minimising false alarms.&lt;br /&gt;
The &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; breaks model predictions into TP, TN, FP, and FN, enabling detailed evaluation of detection accuracy, error types, and security risk, which is essential for assessing and improving a model’s real-world performance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Why is a &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; considered more informative than just looking at a model's accuracy? Can you give an example where accuracy alone might be misleading?&lt;br /&gt;
A &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; is considered more informative than model accuracy because accuracy only provides a single overall percentage of correct predictions, without showing how or where errors occur. Accuracy treats all errors as equal and does not distinguish between different types of misclassifications, which can be critical in real-world applications such as cybersecurity, healthcare, or fraud detection.&lt;br /&gt;
The &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt;, on the other hand, breaks predictions into true positives, true negatives, false positives, and false negatives. This detailed breakdown reveals whether a model is making dangerous errors (such as missing attacks) or less critical errors (such as raising false alarms). It allows practitioners to understand the nature of mistakes, not just the quantity of correct predictions.&lt;br /&gt;
For example, consider an intrusion detection system where 99% of network traffic is normal and only 1% is malicious. A model that predicts normal for every instance would achieve 99% accuracy, which appears excellent at first glance. However, the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; would show zero true positives and a very high number of false negatives, meaning every attack is missed. Despite the high accuracy, the model is completely ineffective and unsafe in practice.&lt;br /&gt;
This example shows that accuracy alone can be misleading in imbalanced datasets, where one class dominates. The &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; exposes these hidden weaknesses by showing class-specific performance, making it essential for evaluating whether a model is genuinely useful and reliable in real-world scenarios.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. How do you calculate precision and recall from a &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt;? Why might a high precision and low recall (or vice versa) be acceptable in some applications but not in others?&lt;br /&gt;
Precision and recall are performance metrics calculated directly from the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt;, using the values of true positives, false positives, and false negatives. They focus on different aspects of a model’s behaviour and are especially important when overall accuracy is not sufficient.&lt;br /&gt;
Precision measures how many of the instances predicted as positive are positive. It is calculated as&lt;br /&gt;
Precision = TP / (TP + FP).&lt;br /&gt;
A high precision value means that when the model predicts a positive outcome, it is usually correct. This is important in applications where false positives are costly. For example, in an intrusion detection system, high precision means that alerts raised by the system are likely to correspond to real attacks, reducing false alarms and analyst workload.&lt;br /&gt;
Recall (also known as sensitivity or detection rate) measures how many actual positive instances the model correctly identifies. It is calculated as&lt;br /&gt;
Recall = TP / (TP + FN).&lt;br /&gt;
A high recall value means the model successfully detects most of the actual positive cases. This is critical in applications where missing a positive case is dangerous, such as detecting cyberattacks, medical conditions, or fraud.&lt;br /&gt;
A high precision but low recall may be acceptable in situations where false positives must be minimised, even if some positives are missed. For example, in automated email spam filtering for business-critical emails, it may be preferable to miss some spam (low recall) rather than incorrectly block legitimate emails (high precision). In such cases, false positives are more harmful than false negatives.&lt;br /&gt;
Conversely, a high recall but low precision may be acceptable where detecting as many positive cases as possible is the priority, even if it leads to more false alarms. For instance, in intrusion detection or cancer screening, it is often better to flag suspicious cases for further investigation rather than risk missing a real attack or illness. Here, false negatives are far more costly than false positives.&lt;br /&gt;
In summary, precision and recall provide complementary insights from the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt;, and the acceptable balance between them depends on the risk, cost, and consequences of different types of errors in a specific application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Imagine a model used to detect fraudulent transactions with a high rate of false positives (incorrectly labelling a non-fraudulent transaction as fraudulent). How would this affect users, and how could the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; guide model improvement?&lt;br /&gt;
If a fraud detection model has a high false positive rate, it means that many legitimate (non-fraudulent) transactions are incorrectly flagged as fraudulent. This has several negative effects on users and the organisation. Customers may experience declined payments, delayed transactions, or blocked cards, which can cause frustration, loss of trust, and inconvenience especially during urgent or high-value purchases. Over time, frequent false alerts may lead users to lose confidence in the service or switch to a competitor.&lt;br /&gt;
From an organisational perspective, high false positives increase operational costs. Each flagged transaction often requires manual review, customer support intervention, or verification steps. This increases workload for fraud analysts and customer service teams, leading to inefficiency and higher costs. In extreme cases, alert fatigue may occur, where genuine fraud cases are overlooked because staff are overwhelmed by false alarms.&lt;br /&gt;
The &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; helps guide model improvement by clearly showing the number of false positives relative to true positives and true negatives. By analysing this breakdown, data scientists can identify that the model is overly aggressive in predicting fraud. This insight allows targeted improvements, such as adjusting the decision threshold, rebalancing the dataset, penalising false positives more heavily, or tuning model parameters to improve precision.&lt;br /&gt;
Additionally, the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; enables comparison between different models or configurations. By tracking changes in FP, TP, FN, and TN after adjustments, developers can quantitatively assess whether improvements reduce false positives without significantly increasing false negatives. In this way, the &lt;a class=&quot;autolink&quot; title=&quot;Confusion matrix&quot; href=&quot;https://moodle.uwtsd.ac.uk/mod/url/view.php?id=629443&quot;&gt;confusion matrix&lt;/a&gt; supports data-driven optimisation, helping achieve a better balance between customer experience and fraud detection effectiveness.&lt;/div&gt;&lt;/p&gt;</description>
      <guid isPermaLink="true">https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217838</guid>
    </item>
    <item>
      <title>This forum post has been removed</title>
      <link>https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217788</link>
      <pubDate>Fri, 19 Dec 2025 11:46:44 GMT</pubDate>
      <description>by Author (hidden). &amp;nbsp;&lt;p&gt;The content of this forum post has been removed and can no longer be accessed.&lt;/p&gt;</description>
      <guid isPermaLink="true">https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217788</guid>
    </item>
    <item>
      <title>This forum post has been removed</title>
      <link>https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217772</link>
      <pubDate>Thu, 18 Dec 2025 12:43:04 GMT</pubDate>
      <description>by Author (hidden). &amp;nbsp;&lt;p&gt;The content of this forum post has been removed and can no longer be accessed.&lt;/p&gt;</description>
      <guid isPermaLink="true">https://moodle.uwtsd.ac.uk/mod/forum/discuss.php?d=131385&amp;parent=217772</guid>
    </item>
  </channel>
</rss>