Answers.Body: <p>This answer will focus on the the concepts of model error and increasing the set of points that a model is meant to fit. Firstly, and most importantly, please understand that the general problem that the  OP is grappling with is not new nor confined to <strong>machine learning</strong>, but rather the other way around, where machine learning is a set of techniques and methods that are being brought to bear on a larger problem of model creation and performance measurement.</p>
  <h2>All models have error</h2>
  <p>And to that end, I introduce one of the most important quotes that one should learn and live by if interested in this domain. IMHO, the simplest form of this concept by <a href="https://en.wikipedia.org/wiki/George_E._P._Box" rel="nofollow noreferrer">Professor Box</a> (the creator of the <strong>Box</strong> plot!) is</p>
  <blockquote>
  <p><a href="https://en.wikipedia.org/wiki/All_models_are_wrong" rel="nofollow noreferrer">Essentially, all models are wrong, but some are useful</a></p>
  </blockquote>
  <p>And this is essentially true of <strong>all</strong> models. They are all necessary simplifications of what we encounter in real world data. All models are built from observation and compilation of experimental data, what we can label as <em>training data</em>, and <strong>all</strong> are subject to failure once they are tested against additional data points, especially those that fall outside of the observed set included in the training data. This does not necessarily make them not useful.</p>
  <p>The original quote from Box is more elaborate in making this point:</p>
  <blockquote>
  <p>Now it would be very remarkable if any system existing in the real world could be exactly represented by any simple model. However, cunningly chosen parsimonious models often do provide remarkably useful approximations. For example, the law PV = RT relating pressure P, volume V and temperature T of an &quot;ideal&quot; gas via a constant R is not exactly true for any real gas, but it frequently provides a useful approximation and furthermore its structure is informative since it springs from a physical view of the behavior of gas molecules.</p>
  <p>For such a model there is no need to ask the question &quot;Is the model true?&quot;. If &quot;truth&quot; is to be the &quot;whole truth&quot; the answer must be &quot;No&quot;. The only question of interest is &quot;Is the model illuminating and useful?&quot;.</p>
  </blockquote>
  <p>This is reminding us that the <a href="https://en.wikipedia.org/wiki/Ideal_gas_law" rel="nofollow noreferrer">Ideal gas equation</a> is such a <em>theorectical, derived</em> model and that, indeed, it fails to predict accurately 100% of the <em>real-word</em> data points that are observed. It is, also, <strong>incredibly</strong> useful to understand and predict how the forces modeled behave and interact.</p>
  <p>For the simplest model of linear regression, look at <a href="https://en.wikipedia.org/wiki/Bivariate_analysis" rel="nofollow noreferrer">bivariate regression</a>. For two observed variables <code>X</code> and <code>Y</code>, you create a <em>regression equation</em> that models the relationship between X and Y. The model, however, isn't actually representing <em>Y</em>, but a new variable, let's call it <code>Y'</code>. Then we arrive at something like:</p>
  <blockquote>
  <p>Y` = a + bX</p>
  </blockquote>
  <p>where the coefficients <code>a</code> and <code>b</code> are chosen to minimize the discrepancy between <code>Y'</code> and <code>Y</code>. If we draw out the variables as vectors in a vector space, we would have two vectors <strong><code>Y</code></strong> and <strong><code>Y'</code></strong> that, hopefully, lie very close to each other. But there is a vector <strong><code>e</code></strong> called the error such that:</p>
  <blockquote>
  <p>e = Y - Y`</p>
  </blockquote>
  <p>The whole algorithm of linear regression is centered on optimizing <code>a</code> and <code>b</code> to minimize <code>e</code>.</p>
  <h2>Sampling from the population</h2>
  <p>So, all models have some error term that we strive to minimize. And for a particular given set of points we may be able to optimize it such that we take the error <strong>perhaps</strong> even to zero. But for any real world set of points where we have only been able to observe, and hence to model, a sample of the population of observances, the very next observance will potentially cause the error term to increase! This is true even of models that were not derived with <strong>machine-learning</strong></p>
  <p>There are many, many useful models that break down for parts of the population of observances, but we still find them useful. Look at <a href="https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation" rel="nofollow noreferrer">Newtonian Gravity</a> which breaks down at certain points of the real-world, but gets most of it right and for which we regularly use for prediction and understanding, in part because it is much simpler to understand and manipulate than something more complex that deals with those other cases, like <a href="https://en.wikipedia.org/wiki/General_relativity" rel="nofollow noreferrer">GR</a> which itself also fails to deal with some complex phenomena like <a href="https://en.wikipedia.org/wiki/Quantum_gravity" rel="nofollow noreferrer">quantum gravity</a>.</p>
  <h1>Over/Under fitting</h1>
  <p>In addition to minimizing the error <strong><code>e</code></strong>, there are two other issues with models and performance, <a href="https://en.wikipedia.org/wiki/Overfitting" rel="nofollow noreferrer">overfitting and underfitting</a>.</p>
  <p>In overfitting, a statistical model describes random error or noise instead of the underlying relationship. Overfitting occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. A model that has been overfit has poor predictive performance, as it overreacts to minor fluctuations in the training data.</p>
  <p>Underfitting occurs when a statistical model or machine learning algorithm cannot capture the underlying trend of the data. Underfitting would occur, for example, when fitting a linear model to non-linear data. Such a model would have poor predictive performance.</p>
  <h2>Summary</h2>
  <p>So, finally, the premise:</p>
  <blockquote>
  <p>no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.</p>
  </blockquote>
  <p>Misses the point that</p>
  <blockquote>
  <p>Essentially, all models are wrong, but some are useful.</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-11T18:49:04.880Z
Answers.Text: Thanks a lot! This is a superb answer. I do understand the points given, but this would apply only to complex models being approximated. Simple deterministic problems do not have the approximation model because of the nature of the problem, but rather because of the nature of the model (which implies simplification... but why should it be that way?). akopacsi's answer seems to discuss that aspect, and with both answers I'm closer to getting the point. Thanks!
Answers.UserDisplayName: Alpha
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-10-15T03:55:27.383Z
Answers.Text: You may have been making a joke, but I fell for it. In the interests of reducing misinformation, the box (and whisker) plot was invented by John Tukey https://en.wikipedia.org/wiki/Box_plot
Answers.UserDisplayName: craq
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-11T18:11:54.980Z
Answers.LastActivityDate: 2017-06-12T18:09:08.150Z
Answers.LastEditDate: 2020-06-17T09:57:20.710Z
Answers.UserDisplayName: Shawn Mehan
Answers.Body: <p>It's true that no general learning algorithm, <strong>machine or human</strong>, can be perfect. It isn't just a problem with machine learning; it's true of human learning. Not of the type of learning we typically think of as learning, such as mathematics, but things like walking, seeing, etc..</p>
  
  <p>We learn to walk in standard situations, and can do it very well, but the model of walking that most of us have don't cope well with walking in high heels. Now, we can learn that, but that doesn't help us walking on tightropes, etc.</p>
  
  <p>Similarly, optical illusions work because they represent situations we don't encounter in normal life, and so have never learned to deal with. Instead our visual system treats them as apparently similar but familiar situations.</p>
  
  <p>There are lots of situations that we may have to cope with but have never learned to do so. How well we do so depends on our mental model of the activity that we have built up, and how well our "learning algorithm" dealt with the training data we had.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-11T20:11:10.657Z
Answers.LastActivityDate: 2017-06-11T20:11:10.657Z
Answers.UserDisplayName: Pak
Body: <p>O'Reilly recently published an article about the machine learning paradox. (<a href="https://www.oreilly.com/ideas/the-machine-learning-paradox" rel="nofollow noreferrer">link</a>)</p>
  
  <p>What it says goes basically like this: no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.</p>
  
  <p>I searched and I couldn't find any other references to this paradox. The closest I got is the <a href="https://en.m.wikipedia.org/wiki/Accuracy_paradox" rel="nofollow noreferrer">Accuracy Paradox</a>, which says that the usefulness of a model is not really well reflected in its accuracy.</p>
  
  <p>This doesn't sound quite ok to me. For example, a linear model could be perfectly learned, "overfitted" and predicted in the real world. So I suspect it is really about finding the right set of data points from which the results can be inferred. This is, we are trying to approximate from uncertain data, but with the right data we can stop approximating and start calculating.</p>
  
  <p><strong>Is my line of thinking correct? Or is there really no perfect machine learning?</strong></p>
  
  <p>UPDATE: In the light of currently received answers, I think my last paragraph (my line of thinking) can be rephrased as: If we have a model simple enough, why can't we overfit the model, knowing that it will behave correctly in non-trained data? This assumes the training data completely represents the real-world data, which would imply a single model that we can train on.</p>
  
  <p>Keep in mind that what we conceive as "simple" or "feasible" is arbitrary and only depends on computation power and available data -- aspects with are external to ML models themselves.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-14T17:19:30.520Z
Comments.Text: The concept of a [solved game](https://en.wikipedia.org/wiki/Solved_game) may be useful.  If you have 100% accuracy, the problem is tractable, which is rarely the case in highly complex systems.  ML is proving useful in tackling intractable problems, but in a condition of intractability, here a function of [bounded rationality](https://en.wikipedia.org/wiki/Bounded_rationality), you never have perfect certainty, only perceived optimality.  The ML system may even get it right 100% of the time in a given sample, but that is no guarantee it will always do so.
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-14T17:40:16.000Z
Comments.Text: That said, I'm finding the explanation in the O'Reilly article hard to follow, although there are some good points overall regarding the ethics. I can't see support in his article that 100% accuracy in a test set is categorically sub-optimal, as opposed to merely irrelevant, although he does later mention manipulating the data set to achieve 100% accuracy, which is, obviously, problematic.
Comments.UserDisplayName: DukeZhou
Tags: <machine-learning>
Title: Is there such a thing like the machine learning paradox?
UserDisplayName: Alpha
ThreadText: # Is there such a thing like the machine learning paradox?
  
  (Asked by: username_0 on 2017-06-10)
  
  O'Reilly recently published an article about the machine learning paradox. ([link](https://www.oreilly.com/ideas/the-machine-learning-paradox))
  
  What it says goes basically like this: no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.
  
  I searched and I couldn't find any other references to this paradox. The closest I got is the [Accuracy Paradox](https://en.m.wikipedia.org/wiki/Accuracy_paradox), which says that the usefulness of a model is not really well reflected in its accuracy.
  
  This doesn't sound quite ok to me. For example, a linear model could be perfectly learned, "overfitted" and predicted in the real world. So I suspect it is really about finding the right set of data points from which the results can be inferred. This is, we are trying to approximate from uncertain data, but with the right data we can stop approximating and start calculating.
  
  **Is my line of thinking correct? Or is there really no perfect machine learning?**
  
  UPDATE: In the light of currently received answers, I think my last paragraph (my line of thinking) can be rephrased as: If we have a model simple enough, why can't we overfit the model, knowing that it will behave correctly in non-trained data? This assumes the training data completely represents the real-world data, which would imply a single model that we can train on.
  
  Keep in mind that what we conceive as "simple" or "feasible" is arbitrary and only depends on computation power and available data -- aspects with are external to ML models themselves.
  
  **Tags:** machine-learning
  
  > **Comments:**
  > **username_1**: The concept of a [solved game](https://en.wikipedia.org/wiki/Solved_game) may be useful.  If you have 100% accuracy, the problem is tractable, which is rarely the case in highly complex systems.  ML is proving useful in tackling intractable problems, but in a condition of intractability, here a function of [bounded rationality](https://en.wikipedia.org/wiki/Bounded_rationality), you never have perfect certainty, only perceived optimality.  The ML system may even get it right 100% of the time in a given sample, but that is no guarantee it will always do so.  
  > **username_1**: That said, I'm finding the explanation in the O'Reilly article hard to follow, although there are some good points overall regarding the ethics. I can't see support in his article that 100% accuracy in a test set is categorically sub-optimal, as opposed to merely irrelevant, although he does later mention manipulating the data set to achieve 100% accuracy, which is, obviously, problematic.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-06-11. Score: 3
  
  This answer will focus on the the concepts of model error and increasing the set of points that a model is meant to fit. Firstly, and most importantly, please understand that the general problem that the OP is grappling with is not new nor confined to **machine learning**, but rather the other way around, where machine learning is a set of techniques and methods that are being brought to bear on a larger problem of model creation and performance measurement.
  
  ## All models have error
  
  And to that end, I introduce one of the most important quotes that one should learn and live by if interested in this domain. IMHO, the simplest form of this concept by [Professor Box](https://en.wikipedia.org/wiki/George_E._P._Box) (the creator of the **Box** plot!) is
  
  > [Essentially, all models are wrong, but some are useful](https://en.wikipedia.org/wiki/All_models_are_wrong)
  
  And this is essentially true of **all** models. They are all necessary simplifications of what we encounter in real world data. All models are built from observation and compilation of experimental data, what we can label as *training data*, and **all** are subject to failure once they are tested against additional data points, especially those that fall outside of the observed set included in the training data. This does not necessarily make them not useful.
  
  The original quote from Box is more elaborate in making this point:
  
  > Now it would be very remarkable if any system existing in the real world could be exactly represented by any simple model. However, cunningly chosen parsimonious models often do provide remarkably useful approximations. For example, the law PV = RT relating pressure P, volume V and temperature T of an "ideal" gas via a constant R is not exactly true for any real gas, but it frequently provides a useful approximation and furthermore its structure is informative since it springs from a physical view of the behavior of gas molecules.
  >
  > For such a model there is no need to ask the question "Is the model true?". If "truth" is to be the "whole truth" the answer must be "No". The only question of interest is "Is the model illuminating and useful?".
  
  This is reminding us that the [Ideal gas equation](https://en.wikipedia.org/wiki/Ideal_gas_law) is such a *theorectical, derived* model and that, indeed, it fails to predict accurately 100% of the *real-word* data points that are observed. It is, also, **incredibly** useful to understand and predict how the forces modeled behave and interact.
  
  For the simplest model of linear regression, look at [bivariate regression](https://en.wikipedia.org/wiki/Bivariate_analysis). For two observed variables `X` and `Y`, you create a *regression equation* that models the relationship between X and Y. The model, however, isn't actually representing *Y*, but a new variable, let's call it `Y'`. Then we arrive at something like:
  
  > Y` = a + bX
  
  where the coefficients `a` and `b` are chosen to minimize the discrepancy between `Y'` and `Y`. If we draw out the variables as vectors in a vector space, we would have two vectors **`Y`** and **`Y'`** that, hopefully, lie very close to each other. But there is a vector **`e`** called the error such that:
  
  > e = Y - Y`
  
  The whole algorithm of linear regression is centered on optimizing `a` and `b` to minimize `e`.
  
  ## Sampling from the population
  
  So, all models have some error term that we strive to minimize. And for a particular given set of points we may be able to optimize it such that we take the error **perhaps** even to zero. But for any real world set of points where we have only been able to observe, and hence to model, a sample of the population of observances, the very next observance will potentially cause the error term to increase! This is true even of models that were not derived with **machine-learning**
  
  There are many, many useful models that break down for parts of the population of observances, but we still find them useful. Look at [Newtonian Gravity](https://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation) which breaks down at certain points of the real-world, but gets most of it right and for which we regularly use for prediction and understanding, in part because it is much simpler to understand and manipulate than something more complex that deals with those other cases, like [GR](https://en.wikipedia.org/wiki/General_relativity) which itself also fails to deal with some complex phenomena like [quantum gravity](https://en.wikipedia.org/wiki/Quantum_gravity).
  
  # Over/Under fitting
  
  In addition to minimizing the error **`e`**, there are two other issues with models and performance, [overfitting and underfitting](https://en.wikipedia.org/wiki/Overfitting).
  
  In overfitting, a statistical model describes random error or noise instead of the underlying relationship. Overfitting occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. A model that has been overfit has poor predictive performance, as it overreacts to minor fluctuations in the training data.
  
  Underfitting occurs when a statistical model or machine learning algorithm cannot capture the underlying trend of the data. Underfitting would occur, for example, when fitting a linear model to non-linear data. Such a model would have poor predictive performance.
  
  ## Summary
  
  So, finally, the premise:
  
  > no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.
  
  Misses the point that
  
  > Essentially, all models are wrong, but some are useful.
  
  > **Comments:**
  > **username_0**: Thanks a lot! This is a superb answer. I do understand the points given, but this would apply only to complex models being approximated. Simple deterministic problems do not have the approximation model because of the nature of the problem, but rather because of the nature of the model (which implies simplification... but why should it be that way?). akopacsi's answer seems to discuss that aspect, and with both answers I'm closer to getting the point. Thanks!  
  > **username_3**: You may have been making a joke, but I fell for it. In the interests of reducing misinformation, the box (and whisker) plot was invented by John Tukey https://en.wikipedia.org/wiki/Box_plot  
  
  ---
  
  ### Answer by username_4 on 2017-06-11. Score: 2
  
  It's true that no general learning algorithm, **machine or human**, can be perfect. It isn't just a problem with machine learning; it's true of human learning. Not of the type of learning we typically think of as learning, such as mathematics, but things like walking, seeing, etc..
  
  We learn to walk in standard situations, and can do it very well, but the model of walking that most of us have don't cope well with walking in high heels. Now, we can learn that, but that doesn't help us walking on tightropes, etc.
  
  Similarly, optical illusions work because they represent situations we don't encounter in normal life, and so have never learned to deal with. Instead our visual system treats them as apparently similar but familiar situations.
  
  There are lots of situations that we may have to cope with but have never learned to do so. How well we do so depends on our mental model of the activity that we have built up, and how well our "learning algorithm" dealt with the training data we had.
  
  
  ---
  
  