Skip to content
LinkedInX

What Is Machine Learning?

About 5 minutes

Machine learning (ML) is a computer science method for automatically learning patterns from data. Google’s Machine Learning Crash Course explains machine learning as a way to train models from data and use them for prediction or classification.[1]

The Difference From Traditional Programming

Section titled “The Difference From Traditional Programming”

The essence of machine learning lies in the difference in approach compared with traditional programming.

Traditional ProgrammingMachine Learning
InputRules (written by humans) + DataData + Correct labels
OutputAnswersRules (a model)
StrengthsProcessing with clear logicComplex pattern recognition
ExampleCalculating sales taxDeciding whether an image contains a cat

Imagine teaching a child what a “cat” is.

  • Traditional programming: Spelling out every rule — “the ears are pointed, it has whiskers, four legs…”
  • Machine learning: Showing thousands of photos and repeatedly saying “this is a cat, this is a dog.” Eventually the child learns to judge “cat-ness” on its own.

The situations where machine learning is most useful are problems where it is difficult to write complex rules explicitly: spam detection, object recognition in images, speech-to-text conversion, and similar tasks.[1]

Supervised learning is a technique that trains on data with correct labels. A model is trained with “answers (supervision)” already provided.[1]

  • Examples: Spam filters (classifying emails as “spam” or “not spam”), house price prediction (predicting price from area, age, and other features)
  • Representative algorithms: Linear Regression, Logistic Regression, Decision Tree, Random Forest, SVM (Support Vector Machine)
graph LR
    D["Labeled Data"] --> M["Training"]
    M --> P["Prediction Model"]
    P --> R["Predictions on New Data"]

Unsupervised learning is a technique for automatically discovering patterns and structures in data that has no correct labels. Because no “answers” are provided, the model finds groups and features in the data on its own.[2]

  • Examples: Customer segmentation (grouping customers with similar purchase patterns), anomaly detection (finding behavior that deviates from normal patterns)
  • Representative algorithms: KMeans clustering, PCA (Principal Component Analysis), DBSCAN

Reinforcement learning is a technique where an agent learns through trial and error, interacting with an environment and maximizing cumulative reward. There are no explicit correct labels; the reward signal from the outcome of each action is what drives learning.[1]

  • Examples: Game AI (mastering Go, chess, and video games to superhuman level), robot control (learning to walk or grasp objects)
  • Analogy: It resembles how a child learns a video game. At first the controls are pressed at random; a rising score reinforces “good actions” and a game-over reinforces “actions to avoid.”

Machine learning is a strong candidate when the following conditions apply:

  1. A large amount of data exists: More data generally means better accuracy
  2. Writing explicit rules is difficult: There are patterns that humans cannot easily articulate
  3. The environment changes over time: Continuously maintaining hand-written rules is costly

Libraries like scikit-learn provide implementations of many machine learning algorithms. The scikit-learn user guide separates supervised learning, unsupervised learning, model selection, computational performance, and related topics.[2]

When choosing an algorithm, compare it across practical criteria instead of relying only on name recognition.

  • Problem type: classification, regression, clustering, or anomaly detection
  • Data shape: tabular data, text, images, time series, or another format
  • Explainability: whether stakeholders need to understand why a prediction was made
  • Compute cost: training time, inference time, and memory use
  • Maintainability: how easy it is to retrain, monitor, and debug as data changes

Q: Are machine learning and AI the same thing?

A: No. AI (Artificial Intelligence) refers broadly to techniques that replicate human intelligence on a computer. Machine learning is one approach to achieving AI. AI also includes rule-based systems and other methods that do not use machine learning.[1]

Q: Do I need programming experience to use machine learning?

A: Yes, if the goal is implementation — basic Python knowledge is needed. However, no programming experience is required just to understand the concepts. Learning concepts first and then moving to implementation tends to produce better results.

Q: Is supervised or unsupervised learning more commonly used?

A: Supervised learning is used more widely in practice. Most real-world problems have a clear target to predict or classify, and the cost of labeling data is often worth the payoff in performance.

  1. Google, Machine Learning Crash Course
  2. scikit-learn, User Guide