What?
- Teach a computer to perform tasks without explicitly programming all the rules.
- Sometimes, we’re trying to teach the computer even though we know all of the rules.
- Works by finding patterns in data (Generalisation).
- Core objective: Minimise error on unseen data.
- Encompasses Supervised Learning, Unsupervised Learning, Reinforcement Learning.
Core Concepts:
- Training Data: A dataset of inputs (features) and outputs (labels or structure).
- Assumes the data is representative of the problem space.
- Data quality directly impacts performance (Garbage In, Garbage Out).
- Model: A mathematical function mapping inputs to outputs (e.g., Linear or Neural Networks).
- Hypothesis Space: All possible functions the model can explore. Relates to Computability
- Learning Algorithm: Finds the best function by iteratively minimising a loss function. Typically Backpropagation
- Loss Function: Quantifies how far the model’s predictions are from the truth.
- Examples: MSE (for regression), Cross-Entropy Loss (for classification).
- Evaluation: Use metrics (e.g., Accuracy vs Precision vs Recall vs F1 vs Perplexity) on a hold-out dataset to test generalisation.
Just Saying!
There’s a lot of dead links on this page. I’m working on it.
Types of Machine Learning:
How It Works:
- Prepare a dataset (cleaning, normalising, splitting into Train-Test Split).
- Choose a model based on the task (e.g., Decision Trees, Support Vector Machines).
- Train the model: Minimise the loss function using an optimisation method like Gradient Descent.
- Evaluate and tune (e.g., Hyperparameter Optimisation).
- Deploy the trained model for predictions.
Challenges:
- Bias and Variance Trade-off: Models too simple (high bias) vs too complex (high variance).
- Overfitting: Performs well on training data but poorly on new data. (Solution: Regularisation, early stopping, or more data.)
- Underfitting: Model fails to capture patterns in data.
Security Concerns:
- Adversarial Attacks: Small, deliberate changes to input can mislead a model (e.g., fooling an image classifier).
- Data Poisoning: Injecting corrupted data during training to bias the model.
- Privacy: Sensitive data in training might be reverse-engineered.
”How Do I Learn AI?”:
Hol' Up
This is by no means the most efficient way of learning ML. It’s adjacent to how I learned it. Ruthlessly ask questions and dive down every rabbit hole you encounter.
- Dive into the world first.
- Watch / Read:
- AI 2041
- Machine of Loving Grace
- Leopold Aschenbrenner on Dwarkesh Patel
- Follow:
- There’s so many more to even list.
- Watch / Read:
- Learn how to code with Pandas. If you don’t know how:
- Do not use ChatGPT for the following.
- Spin up a Google CoLab for Python.
- Watch this entire YouTube video in full. Watch it in 2x.
- Build something you want to build as you watch the video. (EG. Terminal based calculator, a dummy authentication service (bonus points if you learn about and implement hashing, etc.). The point here is creativity and building something you really want to build).
- Watch the following:
- 3Blue1Brown DeepLearning Series
- Watch and Do Andrej Karpathy’s tutorials / videos (here, here, here)
- Pick something you’re interested in the AI (Eg Computer Vision, Language, etc.)
- Take vision for example.
- Decide to be able to detect if your face, live on your webcam, is happy, or sad or whatever.
- Look online for blogs of people doing this and showing how they did it.
- Do EdinburghAI’s workshops (available here). Instructions are available on the ReadMe. For the theory, watch YouTube videos (we’ve unfortunately not made the videos live lol).
- Pick a dataset from Kaggle.
3. Ask a question about the data and try to answer it programmatically. EG:
1. Given a dataset on English movie reviews and whether they were positive or negative, could you come up with a model that takes a review and says if it’s positive or negative?
2. Given a dataset of different countries, their GDP, average years schooling, average BMI etc, make a bunch of graphs that compares 2 different criteria. Eg. Average BMI vs Life Expectancy
1. As an additional step, could you come up with a model that given an average BMI (and all of the other factors), you predict their life expectancy. - If you’ve just done everything here, you’ve simply dipped your toes in. Every step you take, ask “why?” until you’re stopped by the laws of physics. Follow every question you have. Commit to building something before you even know how to build it.
Some of My Notes:
I don’t actively add to this list, so there’s a lot more notes on ML that aren’t here.
- Reinforcement Learning from Human Feedback (RLHF)
- Algorithm Distillation
- Turing Test
- Large Language Models (LLMs)
- AlphaGo
- Attention (AI)
- Autonomous Vehicles
- AV’s Modelling People - A Pro Or Con
- Constitutional AI (RLAIF)
- Containment
- Data Imbalance in Machine Learning
- Google DeepMind
- EdinburghAI
- Exploratory Data Analysis
- For The Love Of Machines
- Intelligence
- MAYA
- Neural Networks
- Reinforcement Learning
- Segmenting Speech or Language
- SLAM
- Tranformer
- Wicklephones