If we have an error for each data. Is it possible to take these errors into account for the training and also maybe for the prediction?

For example:

x errorOf_x
1  0.1      
2  0.01
3  0.4
4  0.01
5  0.02

Definitely the third data should have much less weight in the training. How it can be handled for example in the scikit-learn?


1 Answer 1


In general error is already taken into account in any supervised method.

Typically the model is trained by minimizing errors on the training instances while keeping the ability to generalize. The ability to generalize is crucial: if the model just learns "by heart" the correct answer for every instance, then it doesn't really learn because it cannot predict for any new instance (this is extreme overfitting). So the ability to generalize is necessary but usually this also means that the model does not predict exactly the true answer, instead it captures general patterns.

You could try to weight instances, but it's likely that the performance will decrease because the model already tries its best to minimize errors.


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.