{"id":18576233,"url":"https://github.com/xre22zax/linear-regression-website-sample","last_synced_at":"2025-10-09T09:15:49.828Z","repository":{"id":203521890,"uuid":"708346432","full_name":"xre22zax/Linear-regression-website-sample","owner":"xre22zax","description":"Linear regression and prediction for website","archived":false,"fork":false,"pushed_at":"2024-01-17T11:02:45.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T01:07:57.906Z","etag":null,"topics":["linear-models","linear-regression","predective-modeling","predictive-analysis","predictive-analytics","regression-analysis","regression-model"],"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/xre22zax.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":"2023-10-22T09:39:04.000Z","updated_at":"2024-01-17T11:05:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"418070b8-cb8a-4a88-895c-3aac912ce848","html_url":"https://github.com/xre22zax/Linear-regression-website-sample","commit_stats":null,"previous_names":["xre22zax/linear-regression-website-sample"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xre22zax/Linear-regression-website-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xre22zax%2FLinear-regression-website-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xre22zax%2FLinear-regression-website-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xre22zax%2FLinear-regression-website-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xre22zax%2FLinear-regression-website-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xre22zax","download_url":"https://codeload.github.com/xre22zax/Linear-regression-website-sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xre22zax%2FLinear-regression-website-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001114,"owners_count":26083021,"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-10-09T02:00:07.460Z","response_time":59,"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-models","linear-regression","predective-modeling","predictive-analysis","predictive-analytics","regression-analysis","regression-model"],"created_at":"2024-11-06T23:24:10.473Z","updated_at":"2025-10-09T09:15:49.812Z","avatar_url":"https://github.com/xre22zax.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linear Regression Analysis of Website Usage Time\n\nThis repository contains Python code that explores factors influencing time spent on a website using linear regression.\n\n## Key Findings\n\n- Age and time spent on the website are positively correlated.\n- Chrome users tend to spend longer on the website than Safari users.\n\n## Files\n\n- website.csv: Contains data on user age, browser type, and time spent on the website (in seconds).\n- linear_regression.py: Python script for analysis, including:\n    - Loading and exploring data\n    - Building and fitting linear regression models\n    - Visualizing results\n    - Making predictions\n\n## Dependencies\n\n- pandas\n- numpy\n- matplotlib.pyplot\n- statsmodels.api\n\n## Usage\n\n1. Install dependencies: `pip install pandas numpy matplotlib statsmodels`\n2. Run the script: `python linear_regression.py`\n\n## Key Code Snippets\n\n```python\n# Load data\nwebsite = pd.read_csv('website.csv')\n\n# Model 1: Time vs. Age\nmodel = sm.OLS.from_formula('time_seconds ~ age', website)\nresults = model.fit()\n\n# Model 2: Time vs. Browser\nmodel = sm.OLS.from_formula('time_seconds ~ browser', website)\nresults = model.fit()\n\n# Prediction for 40-year-old\npred40 = results.params[0] + results.params[1]*40\n```\n\n## Contributing\n\nFeel free to submit issues or pull requests for improvements or additions.\n\n---\n\n## Author\n\n[Reza Sadeghi](https://github.com/xre22zax/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxre22zax%2Flinear-regression-website-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxre22zax%2Flinear-regression-website-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxre22zax%2Flinear-regression-website-sample/lists"}