Aprendizado supervisionado, não supervisionado e por reforço
Os alunos classificarão os três principais paradigmas do aprendizado de máquina, examinarão casos de uso concretos de cada um e relacionarão problemas do mundo real ao tipo de aprendizado adequado.
Aprendizado supervisionado, não supervisionado e por reforço é uma aula grátis de Machine Learning Academy no CoddyKit. Esta é a aula 2 de 4. Você pode ler a aula completa abaixo gratuitamente — depois pratica ao vivo no navegador com um editor de código integrado e um tutor de IA 24/7. Faz parte do caminho de aprendizado de Machine Learning Academy, e seu progresso é sincronizado entre a web e o app CoddyKit. O curso de Machine Learning Academy inclui 4 aulas no total.
Partes desta aula ainda não foram traduzidas e aparecem em inglês.
Three Learning Paradigms Overview
ML isn't one technique but a family, split by the feedback they learn from. The big three: supervised, unsupervised, and reinforcement learning.
Supervised Learning: Learning with Labels
Supervised learning trains on examples that already have the right answer (a label). It powers most ML you use, for both classification and prediction.
# Supervised learning example: predict house price
from sklearn.linear_model import LinearRegression
import numpy as np
# Features (size in sq ft) and labels (price in $)
X = np.array([[500], [1000], [1500], [2000]])
y = np.array([100000, 200000, 300000, 400000])
model = LinearRegression()
model.fit(X, y) # supervised: model sees both X and y
# Predict on new data
print(model.predict([[1200]])) # ~$240,000Supervised Learning Use Cases
Supervised learning is everywhere: spam filters, medical diagnosis, credit scoring, and image recognition. In each, the model learns from past labeled examples.
Unsupervised Learning: Finding Hidden Structure
Unsupervised learning works with no labels at all. The algorithm explores the data and finds hidden structure on its own — most often by clustering.
# Unsupervised learning example: K-Means clustering
from sklearn.cluster import KMeans
import numpy as np
# No labels — only features
X = np.array([[1, 2], [1.5, 1.8], [5, 8], [8, 8], [1, 0.6], [9, 11]])
kmeans = KMeans(n_clusters=2, random_state=42)
kmeans.fit(X) # no y — discovers structure on its own
print('Cluster assignments:', kmeans.labels_)
# Automatically finds two groups without any labelsUnsupervised Learning Use Cases
Unsupervised learning shines when labels are too costly: grouping customers, spotting anomalies in network traffic, or finding topics across thousands of articles.
Reinforcement Learning: Learning by Doing
In reinforcement learning, an agent acts in an environment and earns rewards or penalties — learning the best strategy by trial and error, like training a dog. 🐕
Reinforcement Learning Use Cases
Reinforcement learning drives some famous wins: AlphaGo mastering Go through self-play, robots learning to walk, and agents learning to drive in simulation.
Self-Supervised Learning: A Fourth Paradigm
A modern twist is self-supervised learning: the data labels itself. Language models like BERT learn by predicting masked words in a sentence.
Matching Problems to Paradigms
To pick a paradigm, ask: do you have labels? Is the output a category or a number? Is learning reward-driven? A safe default is supervised learning.
Semi-Supervised Learning: Best of Both Worlds
Semi-supervised learning mixes a little labeled data with lots of unlabeled data — perfect when labeling is expensive but raw data is plentiful.
Scikit-learn API for All Paradigms
scikit-learn shines with one consistent API: create an estimator, call fit(), then predict() or transform(). Swapping algorithms takes barely any code.
# Consistent API across paradigms
from sklearn.linear_model import LogisticRegression # supervised
from sklearn.cluster import KMeans # unsupervised
from sklearn.decomposition import PCA # unsupervised
import numpy as np
X = np.random.randn(100, 5)
y = np.random.randint(0, 2, 100)
# Supervised
clf = LogisticRegression()
clf.fit(X, y) # needs labels
# Unsupervised
km = KMeans(n_clusters=3)
km.fit(X) # no labels needed
pca = PCA(n_components=2)
X_reduced = pca.fit_transform(X)Quick Check
Test your understanding of Machine Learning with Python concepts from this lesson.
Lesson Recap
Nice work! Supervised learns from labels, unsupervised finds hidden structure, and reinforcement learns by reward. Next: the full ML workflow.
Aprenda Python com um tutor de IA — grátis
Escreva e execute código real no seu navegador, obtenha ajuda instantânea de um tutor de IA 24/7 e continue de onde parou na web ou no app.
- Cursos
- 30
- Aulas
- 120
Perguntas Frequentes
A aula “Aprendizado supervisionado, não supervisionado e por reforço” é grátis?
Sim — o texto completo de “Aprendizado supervisionado, não supervisionado e por reforço” é grátis para ler aqui na web. Para praticá-la interativamente (um editor de código integrado e um tutor de IA 24/7) e desbloquear o restante do curso de Machine Learning Academy, atualize para CoddyKit PRO. O curso de Machine Learning Academy inclui 4 aulas no total.
O que vou aprender em “Aprendizado supervisionado, não supervisionado e por reforço”?
Os alunos classificarão os três principais paradigmas do aprendizado de máquina, examinarão casos de uso concretos de cada um e relacionarão problemas do mundo real ao tipo de aprendizado adequado. Você pratica Machine Learning Academy com código prático que executa diretamente no navegador, e um tutor de IA 24/7 responde suas dúvidas enquanto trabalha na aula.
Preciso ter experiência prévia para começar Machine Learning Academy?
Nenhuma experiência prévia é necessária. Machine Learning Academy no CoddyKit é estruturado para alunos iniciantes até avançados, então você pode começar aqui ou desde o início e aprender no seu ritmo. Esta é a aula 2 de 4.
Quanto tempo leva a aula “Aprendizado supervisionado, não supervisionado e por reforço”?
A maioria das aulas CoddyKit leva cerca de 5–10 minutos. Cada uma é compacta e interativa, então você faz progresso constante e retoma exatamente de onde parou entre web e app.
Posso escrever e executar código nesta aula de Machine Learning Academy?
Sim. Cada aula de Machine Learning Academy inclui um editor de código integrado, então você escreve e executa código real direto no navegador e recebe feedback de IA instantaneamente — nenhuma configuração local necessária.
Todas as aulas deste curso
- Programação tradicional vs. aprendizado de máquina
- Aprendizado supervisionado, não supervisionado e por reforço
- O fluxo de trabalho do aprendizado de máquina: dos dados à previsão
- Aprendizado de máquina no mundo real: casos de uso e limitações