1
$\begingroup$

Lets say we have trained our model on 900 records (training data) . During prediction on test data of 100 records, assume model produces 95% accuracy.
The question here is, can a mechanism be built, or is there already one, which does not go by prediction route if the data is already part of training data?
Reason for this question is, in real life customers get annoyed when model gives wrong predictions (5% error) for obvious or already seen data. The question is high level, so the critic suggestions are welcome, which can solve this real world problem.

$\endgroup$

1 Answer 1

0
$\begingroup$

Let's first assume a textbook version of the "data". OP's suggestion is easy to implement: one just need a map containing all the training instances as keys with the true answer as value.

  • First, there's the problem of noise and inconsistencies in the training data: if the exact same instance appears 8 times labelled as class A and 2 times as class B, the model will be wrong 20% of the time (more about this case below).
  • If there are any numerical features an/or many features, the space of all possible instances is potentially infinite and it's quite unlikely to find the exact same instance twice. This makes this solution rarely useful and questionable efficiency-wise.
  • On the contrary, if the training data almost completely covers the space of instances then it makes the model almost useless, the map is sufficient (possibly completing any missing instances in the training data).

Let's assume a balanced scenario where the distribution of the instances makes the map solution relevant. There is still the general problem of: what is exactly "the data"?

If we look at it from a standard ML perspective, the data is made of instances, with each instance made of specific values for every feature. But how is the set of features defined? It can be all the information available, or it can be a subset of the information available.

  • First, all the information available is not always all the information needed to make a correct prediction. For example the true answer might depend on the local weather at the customer's location, or whether the customer is in a good mood, etc. This information is not available. This can be the reason why the model makes wrong predictions even on instances seen in the training set. For a non-expert customer their environment feels obvious, as if the machine should know this.
  • Even if we assume that the information available to the model is sufficient to predict the true answer, there can be the case where the model ignores some features. Obviously this would happen with feature selection, but it can also be because some features are not informative enough or because they have too many different values which would cause overfitting. This is an important point: the model needs to generalize in order to make predictions for every possible case, and generalizing involves ignoring the details to some extent. This can also be due to the type of model, for instance linear regression cannot properly represent non-linear factors.
  • The model can even have more information than the customer. For example the model might exploit the time of an action to make its prediction: if the customer does the same action at different times, they might assume that they should obtain the same result as the first time but they don't. This is because the model found during training that statistically most customers at time A want result X while most customers at time B want result Y. Of course a few customers will not obtain the result they expect, because they don't realize that the model uses an information that they don't take into account themselves.

With all these examples I'm trying to show that "the data" is not so clearly defined in general, the customer and the model might have a different perspective about it: two instances which look the same to the customers may differ for the model and conversely. If possible, I think it's more beneficial to understand why such errors happen: it can be something which could be fixed in the model, or it can be something which has to be explained to the customer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.