What is Machine Learning
Machine Learning · Beginner
Definition
Machine Learning is a branch of AI where computers learn patterns from data instead of following hand-written rules.
ML powers recommendations, spam filters, voice assistants and fraud detection.
Diagram
Flowchart
Example: First model with scikit-learn
from sklearn.linear_model import LinearRegression
X = [[1],[2],[3]]; y = [2,4,6]
m = LinearRegression().fit(X, y)
print(m.predict([[4]]))Output: [8.]
Key points
- Supervised uses labels
- Unsupervised finds structure
- Data quality matters most
Interview questions
AI vs ML vs Deep Learning?
ML is a subset of AI; deep learning is ML using multi-layer neural networks.
What is a feature?
An input variable the model uses to make predictions.