Issue 3, Supervised learning - Teach Your Machine to Fish
In this issue, we'll dive into supervised learning and a tiny bit of math, but not that much. Still, I hope this things will clear a little
Welcome to another newsletter, this time, let's dive into more machine learning concepts like supervised learning. What does that mean "supervised"? Well, it's like teaching a machine to fish, you show it how to do something and it learns from that.
Teach me how to fish and about supervised learning
Ok, cool, so tell me about some of the core concepts of supervised learning, oh, and as usual, keep it simple.
Supervised learning is a type of machine learning where you provide the model with labeled data, that is, data that has the correct answer. For example, you provide the model with images of dogs and muffins. All the images of dogs are labeled as "dog" and all the images of muffins are labeled as "muffin".
Ok, label you say, so it's like putting a name tag on the data?
Exactly! You're labelling the data so the model knows what it's looking at.
How exactly does the model "know" what it's looking at?
That's where the training data comes in. You show the model the labeled data and it learns to recognize patterns. So, when you show the model a new image, it can predict whether it's a dog or a muffin based on the patterns it learned from the training data.
Patterns you say, can you expand on that? How exactly does the model recognize patterns?
Think of it like this: when you look at a picture of a dog, you might notice certain features like the shape of the ears, the color of the fur, and the size of the tail.
Ok, but I'm a person, I've been trained to recognize fur, shape of ears and so on, what does the model see and perceive? Just a bunch of pixels right?
That's a great question! Yes, the model sees the image as a bunch of pixels, but it learns to recognize patterns in those pixels. For example, it might learn that a certain combination of pixel values corresponds to an "ear" or a "tail".
Hm, sounds like some math magic is happening behind the scenes.
Yes, for sure. The model uses mathematical algorithms to learn these patterns and make predictions.
Ok, could you expand on that, what kind of algorithms are we talking about here?
There are many algorithms used in supervised learning, such as decision trees, support vector machines, and neural networks. Each algorithm has its strengths and weaknesses, and the choice of algorithm depends on the type of data and the problem you're trying to solve.
Ok, but in the dog vs muffin example, which algorithm would you use and tell me more about that algorithm or algorithms?
In the dog vs muffin example, you might use a simple algorithm like logistic regression or a more complex algorithm like a convolutional neural network (CNN).
I'm sorry but math skills are rusty, could you explain what those algorithms do in simple terms?
Yes of course, logistic regression is like drawing a straight line through the data to separate the dogs from the muffins. A convolutional neural network is like a more complex version of that, where the model learns to recognize features like ears and tails at different levels of abstraction.
I'm going to need some time to digest this, and definitely keep asking questions on this in the next newsletter.
A more real example, real estate
While dogs and muffins sounds like a fun example, let's look at a more real-world scenario, let's say real estate . How could you do supervised learning with real estate?
Well, first, let's try to frame the problem, what questions do you want to answer? For example, you might want to predict the price of a house based on its features like the number of bedrooms, the size of the lot, and the location.
Wait, didn't we just learn that the model learns patterns from the data, labelled data, how would you label the price of a house?
Good question! In this case, you would provide the model with historical data on house prices and their corresponding features.
Ok, I'm listening, give me an example of different labels and features.
Sure, let's say you have a dataset with information on houses like the number of bedrooms, the size of the lot, and the location. The labels would be the actual prices of the houses.
I think I get it, but humour me, provide two examples of houses and their features and labels and how they would be labelled differently.
Ok, here you go:
Ok, so the model learns from these examples and then when you show it a new house with similar features, it can predict the price?
Yes, exactly! The model learns the patterns from the training data and then makes predictions on new data.
Working in the time dimension
That just works on houses sold right now right, what about a specific house type in the future?
Good question! The model can make predictions on new houses based on the patterns it learned from the training data.
I mean, I can reason that the price will likely be higher in the future due to inflation, so how how do I work that in?
That's a great point! You can include additional features in the model like the inflation rate or the economic conditions to make more accurate predictions.
Great, so show me how the data changes taking into account inflation and economic conditions. Show me the same house examples but with these new features.
Sure, here you go:
Ok, so the model learns from these examples and can predict the price of a new house based on these features?
Yes, exactly!
Great, think this is a good place to stop, but thanks for the explanation, I think I get supervised learning a little better now.
Summary
In this issue, we learned about supervised learning, how it uses labelling to feed that into a model. These labels say what things are like a dog or a muffin for example. You can use a similar approach for houses but with houses the label is the price tag and then you record the different properties of the house like number of rooms etc. Hopefully this was another approachable issue, making machine learning and AI fun and interesting :)
Machine Learning Engineer| Computer Vision | Data Science MSc | Python, TensorFlow, Keras, PyTorch, AWS Rekognition
1 周Great article on Supervised Learning, which is useful for well-labelled datasets. Would love it if you could cover semi-supervised and unsupervised learning, which might work better for unknown or poorly documented patterns. #MachineLearning #PatternRecognition
??Founder of AIBoost Marketing, Digital Marketing Strategist | Elevating Brands with Data-Driven SEO and Engaging Content??
1 周"Excited to dive into Issue 3 of Machine Learning for Mere Mortals! Time to teach our machines to fish ?? #AI #MachineLearning #SupervisedLearning"
Definitely helped with my understanding of the concept of supervised learning. Another enjoyable read!
ROS | CAD | AI
1 周Love how 'Machine Learning for Mere Mortals' makes concepts like supervised learning so accessible! Teaching machines to fish rather than handing them the catch is a powerful way to approach AI. Excited to dive into this issue! ???? #AI #MachineLearning #SupervisedLearning