-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsample_presentation.html
More file actions
349 lines (325 loc) · 15.1 KB
/
sample_presentation.html
File metadata and controls
349 lines (325 loc) · 15.1 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!DOCTYPE html>
<html>
<head>
<title>Generated Presentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.5.0/reveal.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.5.0/theme/white.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.5.0/reveal.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.6.1/mermaid.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section><h2>Welcome: Introduction to Machine Learning</h2><div style="height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 20px;">
<h1 style="text-align: center;">Welcome: Introduction to Machine Learning</h1>
<div style="text-align: justify;">
<p>Machine Learning (ML) is a method of data analysis that automates analytical model building. It is a branch of artificial intelligence based on the idea that systems can learn from data, identify patterns, and make decisions with minimal human intervention. ML is widely used in various applications such as recommendation systems, speech recognition, image recognition, and autonomous driving.</p>
</div>
<p style="text-align: center;">Presented by: John Doe | Contact: john.doe@example.com</p>
</div></section>
<section><h2>What is Machine Learning?</h2><div style="text-align: center;">
<h1>What is Machine Learning?</h1>
<p>Machine Learning is a subset of artificial intelligence that focuses on building systems that can learn from and make decisions based on data, without being explicitly programmed.</p>
<div style="margin-top: 20px;">
<p><strong>Example:</strong> A spam filter that learns to identify spam emails by analyzing patterns in a dataset of labeled emails.</p>
</div>
</div></section>
<section><h2>Types of Machine Learning</h2><h1>Types of Machine Learning</h1>
<p>Machine Learning can be broadly categorized into three types: Supervised Learning, Unsupervised Learning, and Reinforcement Learning. Each type addresses different kinds of problems and uses different approaches.</p>
<ul>
<li><strong>Supervised Learning:</strong> Uses labeled data to train models. Examples include regression and classification.</li>
<li><strong>Unsupervised Learning:</strong> Involves finding patterns in unlabeled data. Examples include clustering and association.</li>
<li><strong>Reinforcement Learning:</strong> Trains models to make a sequence of decisions by rewarding good outcomes and penalizing bad ones. Examples include robotics and game playing.</li>
</ul></section>
<section><h2>Supervised Learning</h2><div id="supervised-learning-visualization"></div>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script>
var data = [
{type: "Training Data", x: 100, y: 150, color: "blue"},
{type: "Model", x: 300, y: 150, color: "green"},
{type: "Test Data", x: 500, y: 150, color: "red"}
];
var svg = d3.select("#supervised-learning-visualization")
.append("svg")
.attr("width", 600)
.attr("height", 300);
svg.selectAll("circle")
.data(data)
.enter()
.append("circle")
.attr("cx", function(d) { return d.x; })
.attr("cy", function(d) { return d.y; })
.attr("r", 50)
.style("fill", function(d) { return d.color; });
svg.selectAll("text")
.data(data)
.enter()
.append("text")
.attr("x", function(d) { return d.x; })
.attr("y", function(d) { return d.y + 5; })
.text(function(d) { return d.type; })
.attr("text-anchor", "middle")
.style("fill", "white")
.style("font-size", "12px");
svg.append("line")
.attr("x1", 150)
.attr("y1", 150)
.attr("x2", 250)
.attr("y2", 150)
.style("stroke", "black")
.style("stroke-width", 2);
svg.append("line")
.attr("x1", 350)
.attr("y1", 150)
.attr("x2", 450)
.attr("y2", 150)
.style("stroke", "black")
.style("stroke-width", 2);
svg.append("text")
.attr("x", 200)
.attr("y", 170)
.text("Train")
.style("font-size", "10px")
.attr("text-anchor", "middle");
svg.append("text")
.attr("x", 400)
.attr("y", 170)
.text("Predict")
.style("font-size", "10px")
.attr("text-anchor", "middle");
svg.append("text")
.attr("x", 300)
.attr("y", 100)
.text("Supervised Learning Process")
.style("font-size", "14px")
.attr("text-anchor", "middle");
</script>
<div style="position: absolute; right: 10px; top: 10px; width: 200px;">
<p><strong>Controls:</strong></p>
<p>Click and drag nodes to see effects on the model.</p>
</div></section>
<section><h2>Unsupervised Learning</h2><div class="slide">
<h2>Unsupervised Learning</h2>
<div id="clustering-visualization"></div>
<div class="controls">
<p><strong>Controls:</strong></p>
<button onclick="changeData('kmeans')">K-Means</button>
<button onclick="changeData('hierarchical')">Hierarchical</button>
<button onclick="changeData('dbSCAN')">DBSCAN</button>
</div>
</div>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script>
const width = 400, height = 300;
const margin = {top: 20, right: 20, bottom: 30, left: 40};
const svg = d3.select("#clustering-visualization").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", `translate(${margin.left},${margin.top})`);
let data = d3.range(200).map(() => ({x: Math.random() * width, y: Math.random() * height, cluster: null}));
const color = d3.scaleOrdinal(d3.schemeCategory10);
function draw(data) {
svg.selectAll(".dot")
.data(data)
.join("circle")
.attr("class", "dot")
.attr("cx", d => d.x)
.attr("cy", d => d.y)
.attr("r", 4)
.attr("fill", d => color(d.cluster));
}
function kmeansCluster(k) {
const centroids = Array.from({length: k}, (_, i) => ({x: Math.random() * width, y: Math.random() * height, idx: i}));
let assignmentsChanged;
do {
assignmentsChanged = false;
data.forEach(point => {
point.cluster = centroids.reduce((a, b) => {
const distA = Math.sqrt(Math.pow(point.x - a.x, 2) + Math.pow(point.y - a.y, 2));
const distB = Math.sqrt(Math.pow(point.x - b.x, 2) + Math.pow(point.y - b.y, 2));
return distA < distB ? a.idx : b.idx;
});
});
centroids.forEach(centroid => {
const assignedPoints = data.filter(d => d.cluster === centroid.idx);
const newX = assignedPoints.reduce((sum, p) => sum + p.x, 0) / assignedPoints.length;
const newY = assignedPoints.reduce((sum, p) => sum + p.y, 0) / assignedPoints.length;
if (newX !== centroid.x || newY !== centroid.y) {
assignmentsChanged = true;
centroid.x = newX;
centroid.y = newY;
}
});
} while(assignmentsChanged);
draw(data);
}
function hierarchicalCluster() {
const cluster = d3.cluster().size([height, width]);
const root = d3.hierarchy({children: data.map(d => ({children: [], x: d.x, y: d.y}))});
cluster(root);
data.forEach((d, i) => {
d.cluster = i < 100 ? 0 : 1; // Simplified clustering for visualization
});
draw(data);
}
function dbSCANCluster(eps, minPts) {
const visited = new Set();
let clusterId = 0;
function expandCluster(pointIdx, neighbors) {
data[pointIdx].cluster = clusterId;
while (neighbors.length) {
const neighborIdx = neighbors.pop();
if (!visited.has(neighborIdx)) {
visited.add(neighborIdx);
const neighborNeighbors = getNeighbors(neighborIdx);
if (neighborNeighbors.length >= minPts) neighbors = [...neighbors, ...neighborNeighbors];
}
if (data[neighborIdx].cluster === null) data[neighborIdx].cluster = clusterId;
}
}
function getNeighbors(pointIdx) {
return data.reduce((acc, point, i) => {
const dist = Math.sqrt(Math.pow(data[pointIdx].x - point.x, 2) + Math.pow(data[pointIdx].y - point.y, 2));
return dist <= eps ? [...acc, i] : acc;
}, []);
}
data.forEach((point, idx) => {
if (!visited.has(idx)) {
visited.add(idx);
const neighbors = getNeighbors(idx);
if (neighbors.length < minPts) data[idx].cluster = -1;
else {
expandCluster(idx, neighbors);
clusterId++;
}
}
});
draw(data);
}
function changeData(method) {
if (method === 'kmeans') kmeansCluster(3);
else if (method === 'hierarchical') hierarchicalCluster();
else if (method === 'dbSCAN') dbSCANCluster(20, 5);
}
draw(data);
</script>
<style>
.dot {
stroke: #000;
stroke-width: 1.5px;
}
.controls {
margin-top: 20px;
}
button {
margin-right: 10px;
padding: 5px 10px;
}
</style></section>
<section><h2>Reinforcement Learning</h2><h2>Reinforcement Learning</h2>
<p><strong>Description:</strong> A type of machine learning where an agent learns to make decisions by taking actions in an environment to maximize some notion of cumulative reward. It learns through trial and error, receiving feedback in the form of rewards or penalties.</p>
<p><strong>Example:</strong> Training a robot to navigate a maze. The robot receives a reward for finding the exit and a penalty for hitting walls. Over time, it learns the optimal path.</p>
<img src="reinforcement-learning-diagram.png" alt="Reinforcement Learning Diagram" style="width: 50%; display: block; margin: 0 auto;"></section>
<section><h2>Key Machine Learning Algorithms</h2><h2>Key Machine Learning Algorithms</h2>
<table>
<tr>
<th>Algorithm</th>
<th>Description</th>
</tr>
<tr>
<td>Linear Regression</td>
<td>Used for predicting a continuous dependent variable based on one or more independent variables.</td>
</tr>
<tr>
<td>Logistic Regression</td>
<td>Binary classification algorithm predicting the probability that a given input point belongs to a particular category.</td>
</tr>
<tr>
<td>Decision Trees</td>
<td>Model predicting the value of a target variable by learning decision rules inferred from the features of the input data.</td>
</tr>
<tr>
<td>Support Vector Machines (SVM)</td>
<td>Used for classification and regression analysis, finding the hyperplane that best separates the classes.</td>
</tr>
<tr>
<td>K-Means Clustering</td>
<td>Unsupervised learning algorithm that partitions data into K distinct, non-overlapping subsets.</td>
</tr>
<tr>
<td>Random Forest</td>
<td>Ensemble learning method using multiple decision trees to improve the accuracy and robustness of the model.</td>
</tr>
<tr>
<td>Naive Bayes</td>
<td>Based on Bayes' theorem, used for classification problems with strong independence assumptions between features.</td>
</tr>
<tr>
<td>k-Nearest Neighbors (k-NN)</td>
<td>Non-parametric method used for classification and regression that predicts based on the nearest training examples.</td>
</tr>
<tr>
<td>Neural Networks</td>
<td>Model inspired by the human brain, consisting of layers of interconnected nodes that process information.</td>
</tr>
<tr>
<td>Gradient Boosting Machines (GBM)</td>
<td>Ensemble technique that builds models sequentially, each one correcting the errors of the previous models.</td>
</tr>
</table></section>
<section><h2>Training a Machine Learning Model</h2>graph TD
A[Collect Data] --> B[Preprocess Data]
B --> C[Split Data]
C -->|Training Set| D[Train Model]
C -->|Test Set| E[Validate Model]
D --> F[Optimize Parameters]
F --> G[Repeat if Necessary]
G -->|Yes| D
G -->|No| H[Deploy Model]
E --> H
H --> I[Monitor Performance]
I --> J[Retrain Model if Needed]
J --> H</section>
<section><h2>Challenges in Machine Learning</h2><div>
<h1>Challenges in Machine Learning</h1>
<ul>
<li><strong>Data Quality:</strong> Poor quality data can lead to inaccurate models. <br><em>Example:</em> Missing labels in a dataset.</li>
<li><strong>Overfitting:</strong> Model performs well on training data but poorly on unseen data. <br><em>Example:</em> A decision tree that memorizes training data.</li>
<li><strong>Underfitting:</strong> Model is too simple to capture the underlying structure in the data. <br><em>Example:</em> A linear model applied to data with complex patterns.</li>
<li><strong>Feature Selection:</strong> Choosing relevant features to improve model performance. <br><em>Example:</em> Identifying significant genes in cancer research.</li>
<li><strong>Scalability:</strong> Handling large datasets efficiently. <br><em>Example:</em> Processing social media data in real-time.</li>
<li><strong>Interpretability:</strong> Understanding how a model makes decisions. <br><em>Example:</em> Explaining a neural network's prediction.</li>
<li><strong>Bias and Fairness:</strong> Ensuring models do not discriminate against certain groups. <br><em>Example:</em> Fair housing allocation systems.</li>
<li><strong>Computational Resources:</strong> Requiring significant processing power and time. <br><em>Example:</em> Training deep learning models.</li>
</ul>
</div></section>
<section><h2>Conclusion and Q&A</h2><div>
<h1>Conclusion and Q&A</h1>
<ul>
<li>Machine Learning is a subset of AI that focuses on systems that can learn from data.</li>
<li>Key components include algorithms, data, and models.</li>
<li>Applications range from recommendation systems to autonomous vehicles.</li>
<li>Challenges include data quality, model interpretability, and ethical considerations.</li>
</ul>
<div style="text-align: center;">
<h2>Q&A</h2>
</div>
</div></section>
</div>
</div>
<script>
Reveal.initialize({
controls: true,
progress: true,
center: true,
hash: true
});
mermaid.initialize({
startOnLoad: true,
theme: 'default'
});
</script>
</body>
</html>