About this question
How would you estimate the generalization error? What are the methods of achieving this?
How would you estimate the generalization error? What are the methods of achieving this?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask Artificial Intelligence Expert
Answered on May 11, 2022
Generalization error is the error obtained by applying a model to data it has not seen before. So, if you want to measure generalization error, you need to remove a subset from your data and don't train your model on it. After training, you verify your model accuracy (or other performance measures) on the subset you have removed since your model hasn't seen it before. Hence, this subset is called a test set. Additionally, another subset can also be used for parameter selection, which we call a validation set. We can't use the training set for parameter tuning, since it does not measure generalization error, but we can't use the test set too since our parameter tuning would overfit test data. That's why we need a third subset.
Finally, in order to obtain more predictive performance measures, we can use many different train/test partitions and average the results. This is called cross-validation.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step Artificial Intelligence guides from industry experts
Common Artificial Intelligence interview questions, answered
Guides, tips and career advice on Artificial Intelligence from JanBask experts.
Artificial Intelligence Generative AI vs Agentic AI: Key Differences, Career Impact, and What to Learn in 2026
Generative AI creates. Agentic AI executes. Learn the key differences, real-world use cases, career opportunities, salary trends,…
Artificial Intelligence What is Agentic AI and Its Impact on Jobs in 2026
Discover what Agentic AI is, how it works, how it differs from traditional AI, real-world use cases, job market impact, and the…
Artificial Intelligence Your New Career Guide: JanBask Training’s AI Assistant Goes Live
Discover the new JanBask AI Assistant — your 24/7 guide for IT training and careers. Get instant answers on QA, Cybersecurity,…
Artificial Intelligence TinyML and Edge AI: Running Machine Learning on Small Devices
Learn what TinyML & Edge AI are, why they matter in 2025, top tools, real-world projects, skills required, and career…