← Machine learning basics
Lesson 1 of 4
What machine learning is
Watch, read the card, then practise. Supervised or unsupervised · Features and labels · Training and test data
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicSupervised or unsupervised
Supervised learning learns from examples with answers; unsupervised learning finds patterns without them.
Remember: Have the answers in your data? Supervised. Don't? Unsupervised.
Features and labels
Features are the inputs a model uses; the label is what it predicts.
Remember: X = inputs, y = the answer.
Training and test data
Split your data: train the model on one part and test it on data it has never seen.
Remember: Never let the model see the test set while learning.
Try the example in Code Lab
rows = list(range(100)) cut = int(len(rows) * 0.8) train, test = rows[:cut], rows[cut:] print(len(train), len(test))