Model Ability to prefer well on unseen data thats not use for training phase. The goal of a training a model is to achieve good generalization so that it can make accurate prediction on data it has naver encountered before. Balancing the trade-off between underfitting and overfitting is crucial for achieving good generalization.

Generalization issues in Model Training and Evaluation
- Overfiting (explained below)
- Underfiting (explained below)
- Data Quality and Quantity
- Limited or poor quality may not gives us the underlying pattrens in the real-world problem. Collect more diverse and represenattive data, clean and preprocess data affectively and address biases in the dataset
- Feature Selection and Engineering
- Inappropriate or insufficient features may hinder the model’s ability to generalize, the model will overlook the relevant pattrens or be sensitive to irelevant ones. carefully select and engineer features based on domain knowledge and use dimension reduction to improve feature representation
- Hyperparameter Tuning
- Poorly tuned can lead to suboptimal model performance, model may not generalize well. Conduct tuning using techniques like grid search or random search to find optimal value
- Cross-Validation (explained below)
Bias
- A high bias indicates that the model is too simple and doen’t capture the underlying pattrens in the data. It can lead to underfiting. It lascks the necessary complexity to generalize well.
- Underfit models may have high bias and low variance. they typically result from using too few features or employing an overly simplistic algorithm
- To address bias, one might consider using more complex model that can capture the true relationship of the data without overfitting.

Variance
- model is sensitive to small flunctions or noise in the training data. A high variance model is overly complex and capture not only underlying patterns in the data but also the random noise. This cause model to perform extremely well on training dataset but poorly on unseen data because it essentially memorizes the training set rather than learning the general patterns.
- Overfit model have low bias and high variance.
- To address variance , one might consider a simplifying the model or using regularization techniques and Cross-validation

Regularization
It introduces penalties for overly complex models, encourgaing a balance between fitting the training data and avoiding overfiting

L1 Regularization (Lasso)
L1 goal is to minimziae the loss function, as it encourges the sparsity in the model, meaning some of the coefficients may become exactly zero, effectively eliminating certain features
$λ+∑∣w_i∣$
L2 Regularization Ridge