Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianlesko/live-linear-regression
perform regression on a live data feed
https://github.com/brianlesko/live-linear-regression
Last synced: about 20 hours ago
JSON representation
perform regression on a live data feed
- Host: GitHub
- URL: https://github.com/brianlesko/live-linear-regression
- Owner: BrianLesko
- License: mit
- Created: 2024-01-21T21:35:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-21T22:15:54.000Z (10 months ago)
- Last Synced: 2024-01-21T23:22:25.625Z (10 months ago)
- Language: Python
- Size: 13.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Live Linear Regression
This code implements live data regression for a live data feed written with Streamlit, a low code Web browser UI. This project is written in [Pure Python](https://raw.githubusercontent.com/BrianLesko/live-data-regression/main/app.py) in under 50 lines of code. Created by Brian Lesko for professional engineering purposes.
## Dependencies
This code uses the following libraries:
- `streamlit`: for building the user interface.
- `numpy`: for creating arrays.
- `matplotlib`: for saving image data
## Usage
Run the following commands:
```
pip install --upgrade streamlit matplotlib
streamlit run https://raw.githubusercontent.com/BrianLesko/live-data-regression/main/app.py
```This will start the local Streamlit server, and you can access the chatbot by opening a web browser and navigating to `http://localhost:8501`.
## Repository Structure
```
repository/
├── app.py # the code and UI integrated together live here
├── customize_gui # class for adding gui elements
├── requirements.txt # the python packages needed to run locally
├── .gitignore # includes the local virtual environment named my_env
├── plot.py # methods used for setting plot axes
├── .streamlit/
│ └── config.toml # theme info for the UI
└── docs/
└── preview.png # preview photo for Github
```
## Topics
This repository was created after my live data feed repository, that plots data in a real time web server window. in that code, I just simulated some noisy sinusoidal data. Challenges there included getting the plot to be stable, as it tended to jiggle when the X axis updated so often. This project came directly after and serves as a review of the basics of machine learning, linear regression. I chose to use scikit learn because this library is most popular for machine learning at the moment. Fully written in python.
```
scikit-learn | machine learning | linear regression
Python | Low Code | UI | Web application | HTTP | Web server | live data | data science | robotics automation | system management | data collection | monitoring | real time | software dev
Mechanical engineer | Robotics engineer | Engineering
```
╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯
follow all of these for a cookie :)