{"id":23658671,"url":"https://github.com/zakircodearchitect/model-capacity-in-regression-analysis","last_synced_at":"2025-11-28T05:30:17.566Z","repository":{"id":270106641,"uuid":"880207796","full_name":"ZakirCodeArchitect/Model-Capacity-in-Regression-Analysis","owner":"ZakirCodeArchitect","description":"This project examines how model complexity and training size impact prediction stability in polynomial regression. By analyzing models of degrees 1 to 4 with confidence intervals, we gain insights into balancing overfitting and underfitting for optimal model selection.","archived":false,"fork":false,"pushed_at":"2025-01-11T05:15:57.000Z","size":626,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T12:13:16.236Z","etag":null,"topics":["linear-regression","machine-learning","polynomial-regression","univariate-regressions"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZakirCodeArchitect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-29T10:13:43.000Z","updated_at":"2025-01-11T05:16:00.000Z","dependencies_parsed_at":"2025-02-19T10:52:46.186Z","dependency_job_id":null,"html_url":"https://github.com/ZakirCodeArchitect/Model-Capacity-in-Regression-Analysis","commit_stats":null,"previous_names":["zakircodearchitect/model-capacity-in-regression-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZakirCodeArchitect/Model-Capacity-in-Regression-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakirCodeArchitect%2FModel-Capacity-in-Regression-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakirCodeArchitect%2FModel-Capacity-in-Regression-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakirCodeArchitect%2FModel-Capacity-in-Regression-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakirCodeArchitect%2FModel-Capacity-in-Regression-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZakirCodeArchitect","download_url":"https://codeload.github.com/ZakirCodeArchitect/Model-Capacity-in-Regression-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZakirCodeArchitect%2FModel-Capacity-in-Regression-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27297662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-28T02:00:06.623Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linear-regression","machine-learning","polynomial-regression","univariate-regressions"],"created_at":"2024-12-29T00:48:50.820Z","updated_at":"2025-11-28T05:30:17.232Z","avatar_url":"https://github.com/ZakirCodeArchitect.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎓 Deep Learning Polynomial Regression Analysis\n\nThis project explores the power of **polynomial regression models** in capturing trends within the **Online Shoppers Purchasing Intention Dataset**. By analyzing univariate models of polynomial degrees 1 through 4, we investigate how model complexity (capacity) impacts performance across various training set sizes. Our goal is to understand **overfitting, underfitting,** and **confidence in model predictions** as data volume changes.\n\n## 🌟 Project Objectives\n\n1. **Model Capacity Exploration**: Train polynomial regression models of increasing complexity to find the optimal balance between model flexibility and accuracy.\n2. **Training Size Sensitivity**: Examine model performance across training sets of different sizes (100, 1000, 5000, and 8000) and analyze how training size impacts model accuracy and reliability.\n3. **Confidence Interval Analysis**: Plot error bars representing 95% confidence intervals for predictions across 40 different training subsets, providing insights into the variability of model predictions.\n\n## 📂 Project Structure\n\n- **`data/`**: Stores the dataset in `.csv` format.\n- **`models/`**: Contains code for implementing and training polynomial regression models of different degrees.\n- **`scripts/`**: Includes scripts to preprocess data, train models, and visualize results.\n- **`notebooks/`**: Jupyter notebooks for an interactive, step-by-step walkthrough of the analysis.\n- **`results/`**: Stores generated plots, graphs, and summary statistics.\n\n## 🚀 Setup \u0026 Installation\n\nClone this repository and set up the environment as follows:\n\n```bash\ngit clone \u003crepo-url\u003e\ncd \u003cproject-directory\u003e\npip install -r requirements.txt\n\n## 🛠️ Libraries Used\n\n- **NumPy \u0026 Pandas**: Essential for data handling and preprocessing.\n- **Scikit-Learn**: Used for polynomial regression, model evaluation, and train-test splitting.\n- **Matplotlib \u0026 Seaborn**: Data visualization libraries, used for generating plots such as confidence intervals and performance graphs.\n- **Jupyter Notebook**: Provides an interactive environment for experimentation and documentation.\n```\n\n## 🔍 Methodology\n\n### 1. Data Preparation\n   - **Data Splitting**: The dataset is split into an 80:20 ratio for training and testing to ensure robust model evaluation.\n   - **Training Sets**: Training sets are created with sizes of 100, 1000, 5000, and 8000, each with 40 random subsets. These subsets capture variability and facilitate confidence interval estimation.\n\n### 2. Model Training\n   - **Polynomial Degrees**: Polynomial regression models of degrees 1 (linear) through 4 are implemented to examine different levels of model capacity.\n   - **Hyperparameter Tuning**: Optimal model parameters are adjusted based on training performance and error minimization.\n\n### 3. Confidence Interval Calculation\n   - For each model and training subset, predictions are calculated, and a 95% confidence interval is generated. This process helps in understanding prediction stability across different training sizes.\n\n### 4. Capacity vs. Training Size Analysis\n   - Results are analyzed to determine the relationship between **training size** and **optimal model capacity**. Insights from this analysis help evaluate which model complexity best generalizes across various data volumes.\n\n---\n\n## 📊 Results \u0026 Insights\n\n- **Model Complexity Analysis**: Higher-degree polynomials (3 and 4) offer greater flexibility but may risk overfitting on smaller training sets.\n- **Confidence Intervals**: Lower-degree models produce narrower confidence intervals, indicating more stable predictions, while higher-degree models show broader intervals, reflecting greater variability.\n- **Training Size vs. Model Capacity**: Larger training sizes allow for more complex models without overfitting, enhancing generalization.\n\n---\n\n## 📈 Visualizations\n\n- **Error Bar Plots**: 95% confidence intervals illustrate the range of predictions for each model and training subset.\n- **Training Size vs. Optimal Capacity Graph**: This graph demonstrates how the model's optimal complexity evolves with training size.\n\n---\n\n## 📝 Conclusion\n\nThis project provides valuable insights into the trade-offs between **model complexity** and **training data volume**. By analyzing confidence intervals and optimal capacity, we gain a better understanding of how to select the best model for a given dataset, balancing between underfitting and overfitting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakircodearchitect%2Fmodel-capacity-in-regression-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzakircodearchitect%2Fmodel-capacity-in-regression-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzakircodearchitect%2Fmodel-capacity-in-regression-analysis/lists"}