Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 111 ยท Getting Started

Applications of Machine Learning

See where machine learning is used in healthcare, finance, e-commerce, transport, manufacturing, security and farming, plus pattern recognition and challenges.

Machine learning is not one product; it is a way of building the prediction step inside many different products. This lesson tours the main application areas, each with the kind of question it answers, and then looks at two things that run through all of them: pattern recognition (the pipeline behind many ML systems) and the challenges that make real projects harder than demos. It follows What Is Machine Learning? and comes before the workflow lesson.

A helpful habit while reading: for each example, ask what is the input, what is the output, which kind of learning is this (supervised, unsupervised or reinforcement), and what does a mistake cost?

Healthcare

  • Diagnosis from images and signals: classifying X-rays, scans and skin photos, or detecting irregular heart rhythms in an ECG (supervised learning, usually deep learning).
  • Risk prediction: which patients are likely to be readmitted, develop complications or miss appointments (supervised, tabular data; see the medical diagnosis project).
  • Drug discovery: predicting which molecules bind to a target protein, so that fewer compounds have to be tested in the lab.
  • Personalized treatment: estimating which therapy works best for a patient group.

The cost of a miss is high, so recall, calibrated probabilities and a human reviewing the output matter more than raw accuracy.

Finance

  • Fraud detection: flagging suspicious card transactions in real time (fraud project).
  • Credit and loan risk: scoring the chance that an applicant repays (credit risk, loan approval).
  • Algorithmic trading and forecasting: very noisy, and much harder than it looks (price prediction).
  • Customer analytics: churn, lifetime value, personalized offers.

E-commerce, streaming and social media

  • Recommendations: "customers like you also bought", which video to play next (recommender basics, movie recommender).
  • Search ranking and ad targeting: ordering results, and predicting which ad a person will click (click-through rate project).
  • Demand forecasting and pricing: how much stock to hold, when to discount (sales forecast).
  • Content moderation and feed ranking on social platforms, and sentiment analysis of reviews and posts.

Transportation and mobility

  • Autonomous and assisted driving: recognizing lanes, vehicles and pedestrians from cameras and radar, then planning a safe path (perception is supervised, planning often uses reinforcement learning).
  • Arrival-time estimation and routing: predicting travel time from traffic patterns.
  • Ride and fleet management: matching drivers and riders, predicting demand by area and hour.

Manufacturing and energy

  • Predictive maintenance: predicting a machine failure before it happens from vibration, temperature and usage data.
  • Quality control: spotting defective items on a production line with cameras.
  • Process and energy optimization: controlling temperatures, loads and schedules to save energy.

Security

  • Spam and phishing detection: classifying emails and messages (spam filter project).
  • Intrusion and malware detection: finding unusual network behavior or malicious files, often as an anomaly detection problem.
  • Fraud and identity checks: face and voice verification.

Education, agriculture and robotics

  • Education: adaptive learning paths, automatic grading help, predicting which students need support.
  • Agriculture: crop disease detection from leaf photos, yield prediction from weather and soil data, smart irrigation that waters only where sensors show dry soil.
  • Robotics and automation: grasping objects, warehouse navigation and control policies learned by trial and error.

Language, voice and assistants

  • Voice assistants and speech recognition: turning audio into text, then text into intent.
  • Chatbots and writing tools: language models that answer questions and draft text.
  • Translation, summarization, search over documents.

A worked example from manufacturing

Predictive maintenance is a typical supervised project: sensor readings go in, "will fail soon" or "healthy" comes out. Failures are rare (about 1 in 6 here), so we use balanced class weights and judge by precision and recall. We also add a pure-noise column (serial_digit) as a sanity check: an honest explanation method should rank it last. Permutation importance shuffles one column at a time on the test set and measures how much the recall falls, which tells the maintenance team which sensors drive the alarms.

Python Predictive maintenance: predict failures and explain the alarms

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The model finds 84% of the machines that are about to fail, at a precision of 67%, meaning that about one in three alarms is a false one that a technician will check for nothing. Vibration is by far the most important input (shuffling it costs more than 50 points of recall), followed by the hours since the last service, while the pure-noise column scores near zero. In an application like this, the explanation matters as much as the prediction: a technician who sees "vibration is high" trusts and acts on the alarm.

Pattern recognition: the pipeline behind many applications

Pattern recognition is the older name for the problem of assigning a label to raw data such as an image, a sound or a signal, and it is the core of the examples above. Most pattern-recognition systems pass through the same stages:

  1. Sensing: a camera, microphone or sensor captures the raw data, with noise.
  2. Pre-processing: remove noise and impossible values, normalize, segment (separate the object from the background).
  3. Feature extraction: turn the cleaned data into informative numbers (feature extraction).
  4. Classification (or clustering): a learned model decides the class.
  5. Post-processing: use the answer, for example by refusing to decide when the model is unsure and sending the case to a person.

There are several families of approaches: statistical (features and probability, which is most of this course), template matching (compare with stored examples), structural or syntactic (describe shapes by parts and rules) and neural (learn the features and the classifier together, as deep learning does).

The example below runs the five stages on the handwritten-digit images. The "camera" adds noise, the features are the pixel intensities plus the amount of ink in every row and column, the classifier is a logistic regression, and the post-processing step answers only when its confidence is high.

Python A five-stage pattern recognition pipeline with a reject option

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The model alone is right 93.0% of the time. If it is allowed to say "I am not sure" and hand over the doubtful cases to a person, accuracy on the answered images rises to 96.6% (at a threshold of 0.5, answering 92% of the images), 99.0% (answering 71%) and 100% (answering 39%). Choosing that threshold is a business decision: how expensive is a mistake compared with the cost of a human review? This "reject option" is one of the simplest and most effective ways to make a real system safe.

Challenges that every application shares

  • Data: not enough, not representative, mislabeled, or collected under conditions unlike those of use (data and datasets).
  • Generalization: doing well on the test set but not on tomorrow's data (overfitting).
  • Fairness and bias: models learn the biases of their data and can treat groups unequally (fairness).
  • Explainability: people (and regulators) often want to know why (feature importance).
  • Privacy and security: personal data needs protection; models can be attacked or fooled.
  • Drift and maintenance: the world changes and models go stale (monitoring).
  • Cost and integration: the model is a small part of the system; data pipelines, serving and monitoring are the larger part (deployment).

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which of these is a typical unsupervised application?

    Customer segmentation finds structure without labels. The other three use known outcomes as targets.
  2. 2. In the predictive maintenance example, why was a pure-noise column included?

    If a column that cannot matter received high importance, the model or the explanation method would be suspect.
  3. 3. What does the reject option in the pattern recognition pipeline do?

    Refusing low-confidence cases trades coverage for accuracy on the cases the system does answer.
  4. 4. Why is the cost of a mistake an important question in every application?

    A missed disease and a wrongly flagged email have very different costs, so the right metric and threshold differ.

Summary

  • Machine learning serves healthcare, finance, e-commerce, transport, manufacturing, security, education, agriculture, robotics and language applications, each with its own cost of error.
  • Pattern recognition systems share five stages: sensing, pre-processing, feature extraction, classification and post-processing.
  • A reject option (answering only when confident) can raise accuracy on the answered cases substantially.
  • Real projects face data quality, generalization, fairness, explainability, privacy, drift and integration challenges.

Next: how a project is organized from question to deployment, in The Machine Learning Workflow.