Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
664 lines (475 loc) · 18.7 KB
/
Copy pathindex.html
File metadata and controls
664 lines (475 loc) · 18.7 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
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
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
<!-- Generated by build.py from site.yaml — do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Learn By Inventing</title>
<meta name="description" content="Machine Learning and Computer Science taught through guided discovery — derive every algorithm yourself, step by step.">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: Georgia, serif;
background: #fafaf8;
color: #1a1a1a;
max-width: 720px;
margin: 0 auto;
padding: 3rem 1.5rem 5rem;
line-height: 1.7;
}
/* ── Header ── */
.site-header {
border-top: 3px solid #1a1a1a;
padding-top: 1.5rem;
margin-bottom: 2.5rem;
}
.by-line {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #aaa;
margin-bottom: 0.6rem;
font-family: system-ui, sans-serif;
}
.by-line a { color: #c8a96e; text-decoration: none; }
.by-line a:hover { text-decoration: underline; }
h1 {
font-size: 2.4rem;
font-weight: normal;
letter-spacing: -0.5px;
margin-bottom: 0.4rem;
}
.tagline {
color: #666;
font-size: 1.05rem;
margin-bottom: 1.5rem;
}
.philosophy {
font-size: 1rem;
color: #333;
line-height: 1.8;
margin-bottom: 0.75rem;
}
.philosophy-link {
font-size: 0.88rem;
color: #c8a96e;
text-decoration: none;
font-family: system-ui, sans-serif;
}
.philosophy-link:hover { text-decoration: underline; }
/* ── How to use ── */
.preface {
background: #f0ede6;
border-left: 4px solid #c8a96e;
padding: 1rem 1.2rem;
margin: 2rem 0;
font-size: 0.97rem;
color: #333;
}
.preface strong {
display: block;
margin-bottom: 0.4rem;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #888;
font-family: system-ui, sans-serif;
}
/* ── Curriculum tracks ── */
.track {
margin-top: 2.75rem;
}
.track-header {
display: flex;
align-items: baseline;
gap: 0.75rem;
margin-bottom: 0.25rem;
}
.track-number {
font-size: 0.68rem;
font-family: monospace;
color: #bbb;
}
.track-title {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #888;
font-weight: normal;
font-family: system-ui, sans-serif;
}
.track-desc {
font-size: 0.88rem;
color: #888;
margin-bottom: 0.75rem;
font-family: system-ui, sans-serif;
padding-left: 2.8rem;
}
ol {
list-style: none;
counter-reset: chapter;
padding: 0;
}
ol li {
counter-increment: chapter;
display: flex;
align-items: baseline;
gap: 0.75rem;
padding: 0.65rem 0;
border-bottom: 1px solid #e8e6e0;
flex-wrap: wrap;
}
ol li::before {
content: counter(chapter, decimal-leading-zero);
font-size: 0.75rem;
color: #ccc;
min-width: 1.8rem;
font-family: monospace;
flex-shrink: 0;
}
ol li a {
color: #1a1a1a;
text-decoration: none;
font-size: 1rem;
}
ol li a:hover { color: #c8a96e; text-decoration: underline; }
.badge {
font-size: 0.68rem;
background: #e8e6e0;
color: #777;
padding: 0.1rem 0.45rem;
border-radius: 3px;
margin-left: 0.25rem;
vertical-align: middle;
font-family: system-ui, sans-serif;
white-space: nowrap;
}
.colab-link {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.68rem;
background: #fff8e7;
color: #e37400;
border: 1px solid #f5c842;
padding: 0.1rem 0.5rem;
border-radius: 3px;
text-decoration: none;
margin-left: 0.25rem;
vertical-align: middle;
white-space: nowrap;
font-family: system-ui, sans-serif;
}
.colab-link:hover { background: #fff3d0; }
.slides-link {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.68rem;
background: #eef1ff;
color: #4a5acb;
border: 1px solid #b0baff;
padding: 0.1rem 0.5rem;
border-radius: 3px;
text-decoration: none;
margin-left: 0.25rem;
vertical-align: middle;
white-space: nowrap;
font-family: system-ui, sans-serif;
}
.slides-link:hover { background: #dde2ff; }
/* ── Footer ── */
footer {
margin-top: 4rem;
padding-top: 1.5rem;
border-top: 1px solid #e8e6e0;
font-size: 0.82rem;
color: #aaa;
font-family: system-ui, sans-serif;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 0.5rem;
}
footer a { color: #aaa; text-decoration: none; }
footer a:hover { color: #c8a96e; }
@media (max-width: 520px) {
h1 { font-size: 1.8rem; }
.track-desc { padding-left: 0; }
}
</style>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9TZCPED97E"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9TZCPED97E');
</script>
</head>
<body>
<header class="site-header">
<div class="by-line">By <a href="https://girisandeep.com">Sandeep Giri</a></div>
<h1>Learn By Inventing</h1>
<p class="tagline">Machine Learning & Computer Science — derived, not memorized.</p>
<p class="philosophy">
Instead of starting with a formula or an explanation, every chapter here gives you
a sequence of small problems. As you work through them, you begin to see the pattern
yourself. By the end, you have not been taught an algorithm — you have invented one.
That is the difference between knowledge you can recite and understanding you can use.
</p>
<a class="philosophy-link" href="https://girisandeep.com/learning-by-inventing/">Read more about the philosophy →</a>
</header>
<div class="preface">
<strong>How to use this</strong>
Do not read this book. <em>Work with it.</em> Keep a coding environment open alongside each chapter.
Each exercise is one small step — complete it before moving to the next.
Resist the urge to look ahead. The struggle is the lesson.
</div>
<!-- Track 0 -->
<div class="track">
<div class="track-header">
<span class="track-number">0</span>
<span class="track-title">Getting Started</span>
</div>
<p class="track-desc">Set up your coding environment and write your first Python program.</p>
<ol>
<li>
<a href="getting_started/index.html">Getting Started</a>
<span class="badge">interactive</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/getting_started/getting_started.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="line_fitting/index.html">Line Fitting & Curve Fitting</a>
<span class="badge">interactive</span>
<a class="slides-link" href="line_fitting/slides.html">▶ Slides</a>
</li>
<li>
<a href="square_root/index.html">Finding Square Roots</a>
<span class="badge">interactive</span>
<a class="slides-link" href="square_root/slides.html">▶ Slides</a>
</li>
</ol>
</div>
<!-- Track I -->
<div class="track">
<div class="track-header">
<span class="track-number">I</span>
<span class="track-title">Math Foundations</span>
</div>
<p class="track-desc">Build number intuition before writing a single line of code.</p>
<ol>
<li>
<a href="learning_to_count/learning_to_count.html">Learning to Count</a>
<span class="badge">interactive</span>
</li>
<li>
<a href="logarithm/index.html">Logarithms</a>
<span class="badge">interactive</span>
<a class="slides-link" href="logarithm/slides.html">▶ Slides</a>
</li>
</ol>
</div>
<!-- Track II -->
<div class="track">
<div class="track-header">
<span class="track-number">II</span>
<span class="track-title">Programming Fundamentals</span>
</div>
<p class="track-desc">Invent the core constructs of Python from first principles.</p>
<ol>
<li>
<a href="expressions_and_functions/index.html">Expressions & Functions</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/expressions_and_functions/expressions_and_functions.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="if_else/index.html">If-Else</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/if_else/if_else.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="loops_and_array/index.html">Loops and Arrays</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/loops_and_array/loops_and_array.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="recursion/index.html">Recursion</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/recursion/recursion.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="dictionaries/index.html">Dictionaries</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/dictionaries/dictionaries.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="classes_and_objects/index.html">Classes & Objects</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/classes_and_objects/classes_and_objects.ipynb" target="_blank">▶ Colab</a>
</li>
</ol>
</div>
<!-- Track III -->
<div class="track">
<div class="track-header">
<span class="track-number">III</span>
<span class="track-title">Algorithms</span>
</div>
<p class="track-desc">Discover the classic algorithms that every engineer should understand deeply.</p>
<ol>
<li>
<a href="complexity/index.html">Big O & Complexity</a>
<span class="badge">interactive</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/complexity/complexity.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="sorting/index.html">Sorting</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/sorting/sorting.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="binary_search/index.html">Binary Search & Approximations</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/binary_search/binary_search.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="trees_and_heaps/index.html">Trees & Heaps</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/trees_and_heaps/trees_and_heaps.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="pattern_matching/index.html">Pattern Matching</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/pattern_matching/pattern_matching.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="backtracking/index.html">Backtracking</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/backtracking/backtracking.ipynb" target="_blank">▶ Colab</a>
</li>
</ol>
</div>
<!-- Track IV -->
<div class="track">
<div class="track-header">
<span class="track-number">IV</span>
<span class="track-title">Machine Learning</span>
</div>
<p class="track-desc">Reinvent ML algorithms from scratch — no black boxes, no magic.</p>
<ol>
<li>
<a href="encoder_decoder/index.html">The Encoder-Decoder Pipeline</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/encoder_decoder/encoder_decoder.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="secrets_of_prediction/index.html">The Ancient Secrets of Prediction</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/secrets_of_prediction/secrets_of_prediction.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="regression_losses/index.html">Regression Losses</a>
<span class="badge">interactive</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/regression_losses/regression_losses.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="differentiation/slides.html">Differentiation</a>
<span class="badge">slides</span>
<a class="slides-link" href="differentiation/slides.html">▶ Slides</a>
</li>
<li>
<a href="gradient_descent/index.html">Linear Regression & Gradient Descent</a>
<span class="badge">notebook</span>
<a class="slides-link" href="gradient_descent/slides.html">▶ Slides</a>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/gradient_descent/linear_regression_gradient_descent.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="decision_tree/index.html">Decision Trees</a>
<span class="badge">notebook</span>
<a class="slides-link" href="decision_tree/slides.html">▶ Slides</a>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/decision_tree/decision_tree.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="naive_bayes/index.html">Naive Bayes</a>
<span class="badge">interactive</span>
</li>
<li>
<a href="random_forest/index.html">Random Forests</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/random_forest/random_forest.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="classification_metrics/index.html">Classification Metrics</a>
<span class="badge">interactive</span>
<a class="slides-link" href="classification_metrics/slides.html">▶ Slides</a>
</li>
<li>
<a href="kmeans/index.html">K-Means Clustering</a>
<span class="badge">interactive</span>
</li>
<li>
<a href="recommender/index.html">Recommender Systems</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/recommender/recommender.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="neural_networks/index.html">Neural Networks</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/neural_networks/neural_networks.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="convolutions/index.html">Convolutions</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/convolutions/convolutions.ipynb" target="_blank">▶ Colab</a>
</li>
<li>
<a href="information_theory/index.html">Information Theory & Compression</a>
<span class="badge">notebook</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/information_theory/information_theory.ipynb" target="_blank">▶ Colab</a>
</li>
</ol>
</div>
<!-- Track V -->
<div class="track">
<div class="track-header">
<span class="track-number">V</span>
<span class="track-title">Agentic AI</span>
</div>
<p class="track-desc">Build systems that learn, act, and reason autonomously.</p>
<ol>
<li>
<a href="reinforcement_learning/index.html">Reinforcement Learning</a>
<span class="badge">interactive</span>
</li>
<li>
<a href="rag_and_agents/index.html">RAG & Agentic AI</a>
<span class="badge">interactive</span>
<a class="colab-link" href="https://colab.research.google.com/github/cloudxlab/learnbyinventing/blob/main/rag_and_agents/rag_and_agents.ipynb" target="_blank">▶ Colab</a>
</li>
</ol>
</div>
<!-- Track VI -->
<div class="track">
<div class="track-header">
<span class="track-number">VI</span>
<span class="track-title">Projects & Practice</span>
</div>
<p class="track-desc">Apply everything — open-ended problems with no answer key.</p>
<ol>
<li>
<a href="projects/projects.html">Capstone Projects</a>
<span class="badge">open-ended</span>
</li>
<li>
<a href="practice_problems/practice_problems.html">Practice Problems</a>
<span class="badge">drills</span>
</li>
</ol>
</div>
<footer>
<span>Source on <a href="https://github.com/cloudxlab/learnbyinventing" target="_blank" rel="noopener">GitHub</a> · © 2026 <a href="https://cloudxlab.com" target="_blank" rel="noopener">CloudxLab</a></span>
<span><a href="https://girisandeep.com">girisandeep.com</a></span>
</footer>
</body>
</html>