Machine Learning (ML)
Machine learning is a branch of AI where a computer learns patterns from data and makes predictions, instead of being given explicit step-by-step instructions for every case.
Data & AI
In traditional programming, a human writes the rules. In machine learning, you give a model many examples (data) and it figures out the rules itself by adjusting internal numbers until its predictions match the answers.
It's like teaching a child to recognize cats: you don't list every rule about whiskers and tails, you just show lots of pictures labeled 'cat' or 'not cat' until they catch on. The three main styles are supervised, unsupervised, and reinforcement learning.
Examples
Python
from sklearn.linear_model import LinearRegression
X = [[1], [2], [3]] # square footage (hundreds)
y = [150, 250, 350] # price (thousands)
model = LinearRegression().fit(X, y)
print(round(model.predict([[4]])[0]))Output:
450