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 (the creator of the Box plot!) is
Essentially, all models are wrong, but some are useful
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 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. For two observed variables
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
b are chosen to minimize the discrepancy between
Y. If we draw out the variables as vectors in a vector space, we would have two vectors
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
b to minimize
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 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 which itself also fails to deal with some complex phenomena like quantum gravity.
In addition to minimizing the error
e, there are two other issues with models and performance, overfitting and underfitting.
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.
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.