This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE TypeFamilies | |
| , DataKinds | |
| , PolyKinds | |
| , TypeInType | |
| , TypeOperators | |
| , UndecidableInstances | |
| , RankNTypes | |
| #-} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data Point = Pt Int Int | |
| data Expr a = Number Integer | Boolean Bool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Problem Statement | |
| # cons(a, b) constructs a pair, and car(pair) and cdr(pair) returns the first and last element of that pair. | |
| # For example, car(cons(3, 4)) returns 3, and cdr(cons(3, 4)) returns 4. | |
| # Given the below implementation for cons( ), please implement car & cdr | |
| def cons(a, b): | |
| def pair(f): | |
| return f(a, b) | |
| return pair |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait Summable { | |
| fn zero() -> Self; | |
| fn add(&self, other: &Self) -> Self; | |
| } | |
| impl Summable for i32 { | |
| fn zero() -> Self { | |
| 0 | |
| } | |
| fn add(&self, other: &Self) -> Self { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def can_user_act_on_document(user, document, action): | |
| if user.is_admin: | |
| return True | |
| if action == "view": | |
| return document.owner_id == user.id | |
| if action == "edit": | |
| return document.owner_id == user.id | |
| return False # unknown action | |
| # growing conditionals and nested logic |
This is a personalized, self-paced roadmap for mastering the mathematical foundations of Machine Learning (ML) and Artificial Intelligence (AI). It is designed to build a strong "intuition-first" theoretical base, immediately backed by practical Python/NumPy implementations and empirical experiments.
- [MFML] Mathematical Foundations of Machine Learning by Prof. Prathosh AP (IISc)
- [PF] Probability Foundations by Prof. Krishna Jagannathan (IIT Madras)
- [Prathosh-Prob] Probability Theory by Prof. Prathosh (IISc)
- [3B1B-LA] 3Blue1Brown: Essence of Linear Algebra
OlderNewer