Artificial intelligence • Original RRTutors lesson
Machine Learning: A Core Branch of AI
Distinguish learning patterns from examples from hand-authored rules.
Concept and explanation
Machine learning (ML) algorithms fit a model using data to perform prediction, classification, clustering, ranking, or control. Training minimizes an objective over examples; evaluation estimates how well the fitted model works on unseen cases. Data leakage, unrepresentative samples, and changing environments can invalidate apparently strong results.
How to apply it
Define the prediction target and deployment population, split data before model selection, compare a baseline, and preserve a final test set.
Worked example
A house-price model learns from historical features and prices, then predicts values for homes not used to fit its parameters.
Illustrative Python example
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(
features, labels, test_size=0.2, random_state=7
)
Expected result
The split keeps some examples aside for evaluation.
Limitations and cautions
A random split may be inappropriate for time-series, grouped, or highly imbalanced data.
Practice exercise
Choose a baseline for predicting delivery time and explain how you would avoid leakage.
Key takeaway: Machine learning is a data-and-evaluation process, not merely fitting a model.