-
Notifications
You must be signed in to change notification settings - Fork 0
/
resources.html
561 lines (523 loc) · 25.8 KB
/
resources.html
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ML-Scope Resources</title>
<style>
:root {
--dark-blue: #1a365d;
--light-blue: #7db0e8;
--orange: #ff6b35;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: var(--dark-blue);
margin: 0;
padding: 0;
background-color: #f0f8ff;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
nav {
background-color: var(--dark-blue);
padding: 10px 0;
}
nav .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
width: 50px;
height: 50px;
}
.nav-links a {
color: white;
text-decoration: none;
margin-left: 20px;
}
.nav-links a:hover {
color: var(--light-blue);
}
h1 {
text-align: center;
color: var(--dark-blue);
}
.project-container {
border: 1px solid var(--light-blue);
margin-bottom: 20px;
border-radius: 5px;
overflow: hidden;
background-color: white;
}
.project-header {
background-color: var(--light-blue);
padding: 10px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.3s ease;
}
.project-header:hover {
background-color: #6a9fd4;
}
.project-header h2 {
margin: 0;
color: var(--dark-blue);
}
.project-content {
display: none;
padding: 20px;
}
.project-content.active {
display: block;
}
.toggle-icon::after {
content: "\25BC";
color: var(--dark-blue);
}
.project-header.active .toggle-icon::after {
content: "\25B2";
}
a {
color: var(--orange);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.resource-item {
margin-bottom: 20px;
}
.video-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.article-preview {
display: flex;
border: 1px solid var(--light-blue);
border-radius: 5px;
overflow: hidden;
margin-top: 10px;
}
.article-preview img {
width: 200px;
height: 150px;
object-fit: cover;
}
.article-preview-content {
padding: 10px;
flex: 1;
}
.article-preview-content h4 {
margin-top: 0;
}
</style>
</head>
<body>
<nav>
<div class="container">
<a href="index.html">
<img src="aida-logo.jpeg" alt="Logo" class="logo" />
</a>
<div class="nav-links">
<a href="index.html">Problems</a>
<a href="solutions.html">Solutions</a>
<a href="leaderboard.html">Leaderboard</a>
<a href="resources.html">Resources</a>
</div>
</div>
</nav>
<div class="container">
<h1>MLScope Resources</h1>
<div id="content"></div>
</div>
<script>
const resourcesData = [
{
project: 1,
title: "House Price Prediction Resources",
content: `
<div class="resource-section">
<h3>Starter Resources</h3>
<div class="resource-item">
<h4>1. How do I clean my dataset?</h4>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/OS2m0f2gVJ0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="resource-item">
<h4>2. How to train/test split?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/SjOfbbfI2qY" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/fwY9Qv96DJY" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="resource-item">
<h4>3. What are hyperparameters?</h4>
<p>Article: <a href="https://machinelearningmastery.com/difference-between-a-parameter-and-a-hyperparameter/" target="_blank">Difference Between a Parameter and a Hyperparameter</a></p>
</div>
<div class="resource-item">
<h4>4. How to train with hyperparameters?</h4>
<p>Article: <a href="https://aws.amazon.com/what-is/hyperparameter-tuning/#:~:text=When%20you're%20training%20machine,This%20is%20called%20hyperparameter%20tuning." target="_blank">What is Hyperparameter Tuning?</a></p>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/jUxhUgkKAjE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="resource-item">
<h4>5. What is linear regression? How do I implement it?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/R15LjD8aCzc" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/b0L47BeklTE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zPG4NjIkCjc" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/qxo8p8PtFeA" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
<div class="resource-section">
<h3>Bonus Resources</h3>
<div class="resource-item">
<h4>1. What is a simple decision tree?</h4>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/TWeK0TuxhbY" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="resource-item">
<h4>2. How to implement a simple decision tree?</h4>
<p>Article: <a href="https://www.geeksforgeeks.org/decision-tree-implementation-python/" target="_blank">Decision Tree Implementation in Python</a></p>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/YkYpGhsCx4c" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
<div class="resource-item">
<h4>3. How to implement a random forest algorithm?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/v6VJ2RO66Ag" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/kFwe2ZZU7yw" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/_QuGM_FW9eo" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
`,
},
{
project: 2,
title: "Heart Disease Classifier Resources",
content: `
<div class="resource-section">
<h3>Starter Resources</h3>
<div class="resource-item">
<h4>1. What is logistic regression?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/yIYKR4sgzI8" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/EKm0spFxFG4" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
</div>
</div>
<div class="resource-item">
<h4>2. How do I implement logistic regression?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zM4VZR0px8E" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/HYcXgN9HaTM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
</div>
<p>Official documentation: <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html" target="_blank">Scikit-learn Logistic Regression</a></p>
</div>
<div class="resource-item">
<h4>3. What is a support vector machine (SVM)?</h4>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/efR1C6CvhmE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
</div>
<div class="resource-item">
<h4>4. How do I implement a support vector machine (SVM)?</h4>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/7sz4WpkUIIs" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<p>Official documentation: <a href="https://scikit-learn.org/stable/modules/svm.html" target="_blank">Scikit-learn SVM</a></p>
</div>
</div>
<div class="resource-section">
<h3>Bonus Resources</h3>
<div class="resource-item">
<h4>1. What is a decision tree?</h4>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/_L39rN6gz7Y" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/ZVR2Way4nwQ" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
</div>
</div>
<div class="resource-item">
<h4>2. How to implement a decision tree?</h4>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/LDRbO9a6XPU" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
</div>
<div class="resource-item">
<h4>3. How to use PyTorch?</h4>
<p>Official tutorial: <a href="https://pytorch.org/tutorials/beginner/basics/intro.html" target="_blank">PyTorch Basics Tutorial</a></p>
</div>
<div class="resource-item">
<h4>4. How do I build a neural network with PyTorch?</h4>
<p>Official tutorial: <a href="https://pytorch.org/tutorials/beginner/basics/buildmodel_tutorial.html" target="_blank">Build Model Tutorial</a></p>
</div>
</div>
<div class="resource-item">
<h4>5. What is a loss function?</h4>
<p>A loss function is like a guide that helps a machine learning model learn. It measures how far off the model's predictions are from the actual answers. Imagine trying to hit a target with a dart—each time you miss, the loss function tells you how far you are from the bullseye. The goal is to adjust your aim (the model's parameters) to minimize the "miss" or error, so the model gets better at predicting the correct answers over time.</p>
<div class="video-grid">
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/IVVVjBSk9N0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<br>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/QBbC3Cjsnjg" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="resource-item">
<h4>6. How do I implement a loss function?</h4>
<p>Here's a general approach to implementing a loss function:</p>
<ol>
<li>Define the loss function (e.g., Mean Squared Error)</li>
<li>Input: predicted values (y_pred), actual values (y_true)</li>
<li>Initialize loss to 0</li>
<li>For each pair of predicted and actual values:
<ol>
<li>Calculate the difference (error) between predicted and actual values</li>
<li>Square the error</li>
<li>Add the squared error to the total loss</li>
</ol>
</li>
<li>Average the total loss by dividing it by the number of data points</li>
<li>Output the average loss</li>
</ol>
<p>Here's an example implementation of the Mean Squared Error (MSE) loss function in Python:</p>
<pre><code class="language-python">
def mean_squared_error(y_pred, y_true):
"""
Function to compute the mean squared error between
predicted and actual values.
"""
# Ensure inputs are arrays of the same size
n = len(y_pred) # number of data points
loss = 0.0
# Calculate the squared error for each pair of values
for i in range(n):
error = y_pred[i] - y_true[i]
loss += error**2
# Calculate the average loss
loss = loss / n
return loss
</code></pre>
<p>This implementation follows the steps outlined above and provides a concrete example of how to create a loss function in Python.</p>
<p>For more detailed information on implementing loss functions, check out these resources:</p>
<ul>
<li><a href="https://neptune.ai/blog/keras-loss-functions#:~:text=A%20custom%20loss%20function%20can,passed%20at%20the%20compile%20stage" target="_blank">Keras Loss Functions: Everything You Need to Know</a></li>
<li><a href="https://cnvrg.io/keras-custom-loss-functions/" target="_blank">How To Build Custom Loss Functions In Keras For Any Use Case</a></li>
</ul>
</div>
</div>
`,
},
{
project: 3,
title: "LLaMa-3-8B and LLM Optimization Resources",
content: `
<div class="resource-section">
<h3>Starter Resources</h3>
<div class="resource-item">
<h4>1. What is LLaMa-3-8B?</h4>
<p>LLaMa-3-8B is a version of Meta's LLaMa (Large Language Model Meta AI) series, specifically with 8 billion parameters. Parameters are like the "knowledge" a model learns during training. The higher the number of parameters, the more complex patterns the model can understand and generate.</p>
<h5>Why are we using this model?</h5>
<ul>
<li><strong>Pre-trained:</strong> Already trained on a lot of data, so you don't have to train it from scratch.</li>
<li><strong>Good Size:</strong> With 8 billion parameters, it can handle tasks well without needing huge amounts of computing power.</li>
<li><strong>Efficient:</strong> Designed to run efficiently on less powerful machines.</li>
<li><strong>Versatile:</strong> Can be used for many tasks like text generation, classification, or answering questions.</li>
<li><strong>Easy to Use:</strong> Lots of support and documentation available.</li>
<li><strong>Works with Small Data:</strong> Can achieve solid performance even with a small dataset.</li>
</ul>
<p>For more information:</p>
<ul>
<li><a href="https://huggingface.co/meta-llama/Meta-Llama-3-8B" target="_blank">LLaMa-3-8B Documentation on Hugging Face</a></li>
<li>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/8Ul_0jddTU4?si=K62dJyqxmWn0M-qI" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</li>
</ul>
</div>
<div class="resource-item">
<h4>2. How do I benchmark against a baseline dataset?</h4>
<p>Benchmarking against a baseline dataset means comparing a machine learning model's performance to a standard or reference model that has already been tested on the same dataset. It's like testing a new car's speed by racing it against a car with known performance. This helps you understand if the new model is actually better or worse compared to the existing standard.</p>
<p>For more information:</p>
<ul>
<li><a href="https://mlsysbook.ai/contents/benchmarking/benchmarking.html" target="_blank">Benchmarking in Machine Learning Systems</a></li>
</ul>
</div>
<div class="resource-item">
<h4>3. How do I evaluate LLM Performance?</h4>
<p>To evaluate LLM performance, you measure how well the model completes specific tasks using various metrics. Some common metrics include:</p>
<ul>
<li>Accuracy: How often the model gets things right</li>
<li>Perplexity: How confident the model is in its predictions</li>
<li>BLEU score: How closely generated text matches a reference</li>
</ul>
<p>You should also consider the model's speed, resource usage, and how well it generalizes to new data.</p>
<p>For more information:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Perplexity" target="_blank">Perplexity in Natural Language Processing</a></li>
<li><a href="https://www.digitalocean.com/community/tutorials/bleu-score-in-python" target="_blank">Understanding BLEU Score</a></li>
</ul>
</div>
</div>
<div class="resource-section">
<h3>Advanced Resources</h3>
<div class="resource-item">
<h4>1. How does model type affect accuracy and effectiveness?</h4>
<p>Different model architectures and designs can significantly impact a model's accuracy and effectiveness. Experimenting with various configurations allows you to observe how changes in layers, neurons, activation functions, or optimizers affect performance. By comparing results, you can determine which architecture best suits your specific task.</p>
<h5>How do I choose the right model?</h5>
<p>Choosing the right model depends on your problem, data, and goals. Consider factors like task type (classification, regression, etc.), data size and type, and computational resources. Start with simpler models and progress to more complex ones if needed.</p>
<p>For more information:</p>
<ul>
<li>
<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/UiF0FyMFO-8?si=RBtN1KaJheX-xSgO" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</li>
</ul>
</div>
<div class="resource-item">
<h4>2. How do I parameter tune? How do I know what to tune?</h4>
<p>Parameter tuning involves adjusting the hyperparameters of your model to improve its performance. Key areas to focus on include:</p>
<ul>
<li>Learning rate</li>
<li>Batch size</li>
<li>Number of training epochs</li>
<li>Regularization techniques</li>
<li>Optimizer type</li>
<li>Dropout rate</li>
</ul>
<p>Use techniques like grid search or random search to explore different combinations of these hyperparameters.</p>
<p>For more information:</p>
<ul>
<li><a href="https://www.analyticsvidhya.com/blog/2022/02/a-comprehensive-guide-on-hyperparameter-tuning-and-its-techniques/" target="_blank">A Comprehensive Guide on Hyperparameter Tuning and its Techniques</a></li>
</ul>
</div>
<div class="resource-item">
<h4>3. What does model optimization mean?</h4>
<p>Model optimization involves going beyond pre-built tools to actively fine-tune and adjust various aspects of a model for optimal performance. This includes:</p>
<ul>
<li>Fine-tuning hyperparameters</li>
<li>Adjusting model architecture</li>
<li>Implementing advanced training techniques</li>
<li>Using regularization methods</li>
</ul>
<p>The goal is to achieve the highest possible accuracy or efficiency through hands-on adjustments.</p>
<p>For more information:</p>
<ul>
<li><a href="https://dev.to/mage_ai/10-steps-to-build-and-optimize-a-ml-model-4a3h" target="_blank">10 steps to build and optimize a ML model</a></li>
</ul>
</div>
</div>
`,
},
];
function createProjectElement(projectData) {
const projectElement = document.createElement("div");
projectElement.className = "project-container";
projectElement.innerHTML = `
<div class="project-header">
<h2>Project ${projectData.project}: ${projectData.title}</h2>
<span class="toggle-icon"></span>
</div>
<div class="project-content">
${projectData.content}
</div>
`;
return projectElement;
}
function toggleProject(projectHeader) {
projectHeader.classList.toggle("active");
const content = projectHeader.nextElementSibling;
content.classList.toggle("active");
}
function loadContent(data) {
const contentDiv = document.getElementById("content");
contentDiv.innerHTML = "";
data.forEach((project, index) => {
const projectElement = createProjectElement(project);
contentDiv.appendChild(projectElement);
const projectHeader = projectElement.querySelector(".project-header");
projectHeader.addEventListener("click", () =>
toggleProject(projectHeader)
);
// Open the last project by default
if (index === data.length - 1) {
toggleProject(projectHeader);
}
});
}
loadContent(resourcesData);
</script>
</body>
</html>