{"id":30861107,"url":"https://github.com/gperdrizet/linear-regression-demo","last_synced_at":"2025-09-07T16:48:16.462Z","repository":{"id":312283641,"uuid":"1046919098","full_name":"gperdrizet/linear-regression-demo","owner":"gperdrizet","description":"Linear regression introduction and demo using LinkedIn post impression data","archived":false,"fork":false,"pushed_at":"2025-09-05T18:29:36.000Z","size":1673,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T20:35:13.488Z","etag":null,"topics":["data-science","linear-regression","machine-learning","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gperdrizet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-29T12:47:06.000Z","updated_at":"2025-09-05T18:29:40.000Z","dependencies_parsed_at":"2025-08-29T17:19:51.460Z","dependency_job_id":null,"html_url":"https://github.com/gperdrizet/linear-regression-demo","commit_stats":null,"previous_names":["gperdrizet/linear-regression-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gperdrizet/linear-regression-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Flinear-regression-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Flinear-regression-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Flinear-regression-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Flinear-regression-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gperdrizet","download_url":"https://codeload.github.com/gperdrizet/linear-regression-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gperdrizet%2Flinear-regression-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274065729,"owners_count":25216444,"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-09-07T02:00:09.463Z","response_time":67,"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":["data-science","linear-regression","machine-learning","python"],"created_at":"2025-09-07T16:48:14.112Z","updated_at":"2025-09-07T16:48:16.453Z","avatar_url":"https://github.com/gperdrizet.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linear Regression Demo: LinkedIn Post Impressions\n\n[![Codespaces Prebuilds](https://github.com/gperdrizet/linear-regression-demo/actions/workflows/codespaces/create_codespaces_prebuilds/badge.svg)](https://github.com/gperdrizet/linear-regression-demo/actions/workflows/codespaces/create_codespaces_prebuilds)\n\nA hands-on data science lesson teaching linear regression concepts through real-world LinkedIn post impression data. This repository contains interactive demonstrations and assignments designed for introductory data science bootcamp students.\n\n## Lesson Overview\n\nThis lesson teaches fundamental linear regression concepts using LinkedIn post impression data as a practical, relatable example. Students will learn:\n\n- **Single linear regression**: Understanding relationships between one feature and post impressions\n- **Multiple linear regression**: Building models with multiple features for better predictions\n- **Model evaluation**: Using R² scores and visualizations to assess model performance\n- **Real-world application**: Working with actual social media engagement data\n\n### Learning Objectives\n\nBy completing this lesson, students will be able to:\n1. Implement linear regression models using scikit-learn\n2. Evaluate model performance using statistical metrics\n3. Visualize regression results and interpret findings\n4. Compare single vs. multiple feature models\n5. Apply regression techniques to real-world datasets\n\n## Getting Started with GitHub Codespaces\n\n1. Create a fork of the repository\n2. Click the green \"Code\" button your fork of the repository\n3. Select \"Codespaces\" tab\n4. Click \"Create codespace on main\"\n5. Wait for the environment to set up automatically (2-3 minutes)\n\n## How to Use This Repository\n\n### 1. Interactive Demo (`demo.py`)\nThe main teaching tool is an interactive Marimo notebook that automatically launches when you start a Codespace.\n\n- **Access**: Opens automatically in your browser when Codespace starts\n- **Content**: Complete lesson with explanations, code examples, and visualizations\n- **Features**: Interactive widgets, step-by-step progression, embedded exercises\n\n### 2. Assignment Notebook\nStudents work through hands-on exercises in the Jupyter notebook:\n\n**Assignment Tasks**:\n- Load and explore the LinkedIn post dataset\n- Implement single linear regression\n- Build and evaluate multiple linear regression models\n- Compare model performance using R² scores\n- Create visualizations of results\n\n### 3. Solution Notebook\nInstructors can reference the complete solution notebook.\n\n\n## Project Structure\n\n```\nlinear-regression-demo/\n├── README.md                                # This file\n├── demo.py                                  # Interactive Marimo lesson demo\n├── requirements.txt                         # Python dependencies\n├── LICENSE                                  # GNU GPL license\n├── .devcontainer                            # GitHub Codespace configuration\n│\n├── notebooks/\n│   ├── post_impressions_assignment.ipynb    # Student assignment\n│   └── post_impressions_full_solution.ipynb # Complete solution\n│\n└── public/\n    ├── figures/                             # Images for Marimo demo\n    └── data/                                # Post impression data\n        ├── 01-raw_posts.csv                 # Original LinkedIn post data\n        ├── 02-cleaned_posts.csv             # Cleaned dataset\n        └── 03-processed_posts.csv           # Preprocessed features for modeling\n```\n\n### Dataset Description\n\nThe LinkedIn post dataset includes:\n- **impressions**: Number of views (target variable)\n- **word_count**: Length of post content (standardized)\n- **n_tags**: Number of hashtags used (standardized)\n- **external_link**: Presence of external links (encoded)\n- **media**: Presence of images/videos (encoded)\n- **post_day**: Day of week posted (encoded)\n\n## Expected Outcomes\n\nAfter completing this lesson, students should be able to:\n\n- Build linear regression models\n- Understand why multiple features improve prediction accuracy\n- Interpret model coefficients in business context\n- Create meaningful visualizations of regression results\n- Discuss limitations and assumptions of linear regression\n\n## Contributing\n\nThis is an educational resource! Contributions welcome:\n\n- **Bug fixes**: Submit issues or pull requests\n- **Enhancements**: Suggest additional exercises or datasets\n- **Translations**: Help make content accessible in other languages\n- **Feedback**: Share experiences using this in your courses\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperdrizet%2Flinear-regression-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgperdrizet%2Flinear-regression-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgperdrizet%2Flinear-regression-demo/lists"}