Machine Learning Tutorial 0/98 lessons ~6 min read Lesson 2
What is Machine Learning?
What is Machine Learning?
Course progress0%
Focus
6 guided sections
Practice signal
Examples included
Career prep
Foundation builder
Introduction
What is Machine Learning? Machine learning is a branch of Artificial Intelligence that builds systems capable of learning from data. Instead of writing explicit rules for every scenario, you provide examples and let the algorithm discover patterns.
Understanding the topic
How ML differs from traditional programming:
- Traditional: rules + data → output.
- ML: data + desired output → learned rules (model).
- The model generalizes to new, unseen examples after training.
- Quality depends on data volume, quality, and representative features.
| Term | Description |
|---|---|
| Training | Process of fitting a model on labeled or unlabeled data. |
| Features | Input variables (columns) describing each example. |
| Labels | Target values in supervised learning. |
| Model | Mathematical function mapping features to predictions. |
| Inference | Using a trained model to predict on new data. |
Informative example
Minimal scikit-learn workflow:
python
from sklearn.datasets import load_irisfrom sklearn.model_selection import train_test_splitfrom sklearn.ensemble import RandomForestClassifierfrom sklearn.metrics import accuracy_scoreX, y = load_iris(return_X_y=True)X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)model = RandomForestClassifier()model.fit(X_train, y_train)print(accuracy_score(y_test, model.predict(X_test)))
Execution workflow
1Typical ML workflow
1 / 5Collect data
Gather relevant, clean, representative examples.
Best practices
- Start with a simple baseline (logistic regression or random forest) before complex models.
- Document your data sources and preprocessing steps for reproducibility.
Summary
Machine learning learns patterns from data to make predictions or discoveries on new inputs.
Ready to mark this lesson complete?Track your journey across the entire course.