1. 程式人生 > >Why Do Machine Learning Algorithms Work on Data That They Have Not Seen Before?

Why Do Machine Learning Algorithms Work on Data That They Have Not Seen Before?

The superpower of machine learning is generalization.

I recently got the question:

“How can a machine learning model make accurate predictions on data that it has not seen before?”

The answer is generalization, and this is the capability that we seek when we apply machine learning to challenging problems.

In this post, you will discover generalization, the superpower of machine learning

After reading this post, you will know:

  • That machine learning algorithms all seek to learn a mapping from inputs to outputs.
  • That simpler skillful machine learning models are easier to understand and more robust.
  • That machine learning is only suitable when the problem requires generalization.

Let’s get started.

Why Do Machine Learning Algorithms Work on Data They Have Not Seen?

Why Do Machine Learning Algorithms Work on Data They Have Not Seen?
Photo by gnuckx, some rights reserved.

What Do Machine Learning Algorithms Do?

When we fit a machine learning algorithm, we require a training dataset.

This training dataset includes a set of input patterns and the corresponding output patterns. The goal of the machine learning algorithm is to learn a reasonable approximation of the mapping from input patterns to output patterns.

Here are some examples to make this concrete:

  • Mapping from emails to whether they are spam or not for email spam classification.
  • Mapping from house details to house sale price for house sale price regression.
  • Mapping from photograph to text to describe the photo in photo caption generation.

The list could go on.

We can summarize this mapping that machine learning algorithms learn as a function (f) that predicts the output (y) given the input (X), or restated:

1 y = f(X)

Our goal in fitting the machine learning algorithms is to get the best possible f() for our purposes.

We are training the model to make predictions in the future given inputs for cases where we do not have the outputs. Where the outputs are unknown. This requires that the algorithm learn in general how to take observations from the domain and make a prediction, not just the specifics of the training data.

This is called generalization.

Generalization is Hard, but Powerful

A machine learning algorithm must generalize from training data to the entire domain of all unseen observations in the domain so that it can make accurate predictions when you use the model.

This is really hard.

This approach of generalization requires that the data that we use to train the model (X) is a good and reliable sample of the observations in the mapping we want the algorithm to learn. The higher the quality and the more representative, the easier it will be for the model to learn the unknown and underlying “true” mapping that exists from inputs to outputs.

To generalize means to go from something specific to something broad.

It is the way humans we learn.

  • We don’t memorize specific roads when we learn to drive; we learn to drive in general so that we can drive on any road or set of conditions.
  • We don’t memorize specific computer programs when learning to code; we learn general ways to solve problems with code for any business case that might come up.
  • We don’t memorize the specific word order in natural language; we learn general meanings for words and put them together in new sequences as needed.

The list could go on.

Machine learning algorithms are procedures to automatically generalize from historical observations. And they can generalize on more data than a human could consider, faster than a human could consider it.

It is the speed and scale with which these automated generalization machines operate that is what is so exciting in the field of machine learning.

We Prefer Simpler Models

The machine learning model is the result of the automated generalization procedure called the machine learning algorithm.

The model could be said to be a generalization of the mapping from training inputs to training outputs.

There may be many ways to map inputs to outputs for a specific problem and we can navigate these ways by testing different algorithms, different algorithm configurations, different training data, and so on.

We cannot know which approach will result in the most skillful model beforehand, therefore we must test a suite of approaches, configurations, and framings of the problem to discover what works and what the limits of learning are on the problem before selecting a final model to use.

The skill of the model at making predictions determines the quality of the generalization and can help as a guide during the model selection process.

Out of the millions of possible mappings, we prefer simpler mappings over complex mappings. Put another way, we prefer the simplest possible hypothesis that explains the data. This is one way to choose models and comes from Occam’s razor.

The simpler model is often (but not always) easier to understand and maintain and is more robust. In practice, you may want to choose the best performing simplest model.

Machine Learning is Not for Every Problem

The ability to automatically learn by generalization is powerful, but is not suitable for all problems.

  • Some problems require a precise solution, such as arithmetic on a bank account balance.
  • Some problems can be solved by generalization, but simpler solutions exist, such as calculating the square root of positive numbers.
  • Some problems look like they could be solved by generalization but there exists no structured underlying relationship to generalize from the data, or such a function is too complex, such as predicting security prices.

Key to the effective use of machine learning is learning where it can and cannot (or should not) be used.

Sometimes this is obvious, but often it is not. Again, you must use experience and experimentation to help tease out whether a problem is a good fit for being solved by generalization.

Further Reading

This section provides more resources on the topic if you are looking to go deeper.

Summary

In this post, you discovered generalization, the key capabilities that underlie all supervised machine learning algorithms.

Specifically, you learned:

  • That machine learning algorithms all seek to learn a mapping from inputs to outputs.
  • That simpler skillful machine learning models are easier to understand and more robust.
  • That machine learning is only suitable when the problem requires generalization.

Do you have any questions?
Ask your questions in the comments below and I will do my best to answer.

相關推薦

Why Do Machine Learning Algorithms Work on Data That They Have Not Seen Before?

Tweet Share Share Google Plus The superpower of machine learning is generalization. I recently g

How Machine Learning Algorithms Work (they learn a mapping of input to output)

Tweet Share Share Google Plus How do machine learning algorithms work? There is a common princip

Top Machine Learning Algorithms You Should Know to Become a Data Scientist

There are two ways to categorize Machine Learning algorithms you may come across in the field. Generally, both approaches are useful. However, we will focu

Why AI, machine learning is driving data lakes to data hubs

The data lake was a critical concept for companies looking to put information in one place and then tap it for business intelligence, analytics and big dat

New method peeks inside the 'black box' of artificial intelligence: Researchers help explain why machine learning algorithms som

It can be challenging for computer scientists to figure out what went wrong in such cases. This is because many machine learning algorithms learn from inf

Spot Check Machine Learning Algorithms in R (algorithms to try on your next project)

Tweet Share Share Google Plus Spot checking machine learning algorithms is how you find the best

【文獻閱讀】Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms

https://blog.csdn.net/u011995719/article/details/77834375         命名技巧:        

Machine Learning」Note on MSL: Marginal Space Learning (投影空間學習)

[1] Four-Chamber Heart Modeling and Automatic Segmentation for 3-D Cardiac CT Volumes Using Marginal

Why use Machine Learning in DevOps?

Machine Learning (ML): is an application of Artificial Intelligence which allows systems to learn and improve from experience, rather than being manually p

Machine Learning with Time Series Data

As with any data science problem, exploring the data is the most important process before stating a solution. The dataset collected had data on Chicago wea

Types of Machine Learning Algorithms and their use

GBM is a boosting algorithm used when we deal with plenty of data to make a prediction with high prediction power. Boosting is actually an ensemble of lear

Machine Learning with GPUs on vSphere

Performance of Machine Learning workloads using GPUs is by no means compromised when running on vSphere. In fact, you can often achieve better aggregate pe

Understand Machine Learning Algorithms Archives

You Don’t Have To Implement Algorithms …if you’re a beginner and just getting started. Stop. Are you implementing a machine learning algorithm at the mome

Code Machine Learning Algorithms From Scratch Archives

The backpropagation algorithm is the classical feed-forward artificial neural network. It is the technique still used to train large deep learning network

machine learning algorithms

© 2014-2018 Mighty AI. Mighty AI, the Mighty AI logo, Training Data as a Service, TDAAS and SPARE5 are trademarks or registered trademarks of Mighty AI, In

A Tour of Machine Learning Algorithms

Tweet Share Share Google Plus In this post, we take a tour of the most popular machine learning

AI & machine learning fight death with data

Technology is fighting death with data – including machine learning and artificial intelligence. Last week marked the annual Health Informatics New Zealand

Tune Machine Learning Algorithms in R (random forest case study)

Tweet Share Share Google Plus It is difficult to find a good machine learning algorithm for your

How to Build an Ensemble Of Machine Learning Algorithms in R (ready to use boosting, bagging and stacking)

Tweet Share Share Google Plus Ensembles can give you a boost in accuracy on your dataset. In thi

Master Machine Learning Algorithms

I believe my books offer thousands of dollars of education for tens of dollars each. They are months if not years of experience distilled into a few hundre