File size: 2,513 Bytes
c745dff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>DDW Interface - Confusion Matrix Practice</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <header class="site-header">
      <div>
        <p class="kicker">Data Driven World</p>
        <h1>Confusion Matrix Practice (Page 3)</h1>
      </div>
      <nav>
        <a href="index.html">Home</a>
        <a href="simple-sigmoid.html">Simple Sigmoid</a>
        <a class="active" href="confusion-matrix.html">Confusion Matrix (Page 3)</a>
        <a href="sigmoid.html">Sigmoid Function</a>
        <a href="cost-visualization.html">Cost Function</a>
        <a href="about.html">Notes</a>
      </nav>
    </header>

    <main class="layout">
      <section class="panel controls">
        <h2>Exercise Setup</h2>

        <label for="classMode">Classification type</label>
        <select id="classMode">
          <option value="binary">2 classes (Positive / Negative)</option>
          <option value="three">3 classes (A / B / C)</option>
        </select>

        <label for="threshold">Threshold t: <span id="thresholdValue">0.50</span></label>
        <input id="threshold" type="range" min="0.30" max="0.80" step="0.01" value="0.50" />

        <p class="hint" id="ruleText"></p>

        <div class="button-row">
          <button id="checkBtn" type="button">Check My Answers</button>
          <button id="showSolutionBtn" type="button">Show Full Solution</button>
        </div>

        <div class="button-row">
          <button id="newSamplesBtn" type="button">Generate New Samples</button>
          <button id="resetBtn" type="button">Reset Inputs</button>
        </div>

        <div class="stats" id="feedbackStats"></div>
      </section>

      <section class="panel chart-panel confusion-panel">
        <h2>Student Task</h2>
        <p class="hint">
          Six samples are given. Prediction for Sample 1 and 2 are worked examples. You calculate Sample 3 to 6, then
          fill confusion matrix and metrics.
        </p>

        <div id="sampleArea"></div>
        <div id="matrixArea"></div>
        <div id="metricArea"></div>

        <section class="solution-block" id="solutionBlock" hidden>
          <h3>Detailed Process and Solutions</h3>
          <div id="solutionText"></div>
        </section>
      </section>
    </main>

    <script src="confusion.js"></script>
  </body>
</html>