simplify.education

Computational methods / artificial intelligence · BEGINNER LESSON

Machine learning

Machine learning is a set of methods that find patterns in data and use those patterns to make predictions or inferences without being given explicit step-by-step instructions. It is usually trained on examples, then tested on new data to see how well it generalizes.

What it is and what is measured

Machine learning (ML) is a computational approach for discovering patterns in observed examples. In practice, people measure how well an algorithm predicts an outcome from input variables, such as many biological features or other data variables. The goal is often to approximate a target function, meaning the real relationship between inputs and an outcome. ML is closely related to statistics, data mining, pattern recognition, and artificial intelligence.

[1] Machine learning: A primer - PMC - NIH [3] Footnotes

How it works

A machine-learned model is usually trained on a labeled data set, where labels are known answers. During training, the model adjusts internal weights or parameters so it can map inputs to outputs. Some methods use supervised learning, where the answer is known during training; unsupervised learning, where the model searches for structure in unlabeled data; and reinforcement learning, where the model learns from feedback after actions. Deep learning is a subtype of ML that uses neural networks with many layers and can automatically extract features from data.

[2] © 2021 CMA Joule Inc. or its licensors [3] Footnotes

Why data and model design matter

ML methods often work well when data are abundant, especially when there are many variables per sample. However, more data do not guarantee better learning. If the model is too flexible, it may overfit, meaning it learns noise or accidental details from the training set instead of the underlying pattern. Bias in the algorithm or in the data can also skew predictions. A model may also learn spuriously correlated features, which are features that happen to track the label in training but are not the real cause of the outcome.

[1] Machine learning: A primer - PMC - NIH [2] © 2021 CMA Joule Inc. or its licensors [3] Footnotes

Generalization and evaluation

A trained model should be checked on independent, unseen data. This matters because training data may not match the data the model will face later, a problem called out-of-distribution generalization failure when the deployment data differ from the training distribution. Cross-validation is a common way to estimate how well the model may work on future data. In some cases, larger and more diverse training sets help, but performance still depends on whether the new data resemble the training examples.

[1] Machine learning: A primer - PMC - NIH [2] © 2021 CMA Joule Inc. or its licensors [3] Footnotes

Limitations

ML has no single fixed sample-size rule, because needed data depend on the complexity of the problem and the model. High-dimensional data, where the number of variables is large compared with the number of samples, can make learning difficult and increase overfitting risk. Another limitation is interpretability: some models are easier to explain than others, and complex models may act like black boxes. Finally, machine-learned models can perform poorly when the training data are biased, incomplete, or unlike the data seen during use.

[1] Machine learning: A primer - PMC - NIH [2] © 2021 CMA Joule Inc. or its licensors [3] Footnotes

SEE THE IDEA

How machine learning works and where it can fail

Examples feed training, training produces a model, and the model is evaluated on new data; problems arise when the learned pattern does not match future data.

ML learns from examples, but the learned pattern must still be tested against independent data.

TRY IT YOURSELF

Test your understanding

Choose an answer, then check the explanation.

0 of 3 questions answered
01 What is machine learning mainly used for?
02 A model learns that hospital room color predicts readmission, but this only happened in the training set. What is this best described as?
03 Which situation most strongly suggests the model may perform worse than expected?

PUT IT TOGETHER

Match each concept to its meaning

Drag a label onto its description, or select a label and then select a description. This also works with a keyboard.

Sources and further reading

This general lesson was generated from public source material. It explains a concept; it does not interpret a private paper or provide medical advice.

  1. Machine learning: A primer - PMC - NIH
  2. © 2021 CMA Joule Inc. or its licensors
  3. Footnotes
Apply this to a paper →