Giter Club home page Giter Club logo

anomaly_detection's Introduction

Install Libraries

pandas==1.2.4
numpy==1.20.1
matplotlib==3.3.4
sklearn
scikit-learn==0.24.1
streamlit==1.2.0
fastapi==0.70.0
uvicorn==0.15.0
aiohttp==3.8.1
python-multipart==0.0.5
seaborn==0.11.1
gunicorn==20.1.0
statsmodels==0.13.2

Frontend Libraries

Streamlit

Please read the following guidelines for the Streamlit Setup:
https://docs.streamlit.io/library/get-started/installation

pip install streamlit

Fast Api Backend

FastAPI

Please read the following guidelines for the FastAPI Setup:
https://fastapi.tiangolo.com/tutorial/

pip install fastapi
pip install uvicorn
pip install python-multipart

RUN THIS APP LOCALLY

To run this app locally, clone the code from the local branch (very important). Then, set up the virtual environment in your system and run the following command:

pip install -r requirements.txt

After that, run the following below servers:

RUN STREAMLIT SERVER

streamlit run web_app/frontend.py

RUN SERVER FASTAPI

For Isolation Forest:

uvicorn api.if:ifr --reload

For LOF:

uvicorn api.lof:lof --reload

For STL Decomposition:

uvicorn api.stl:stl_decomposition --reload

Now your app should be running on your localhost with the port 8501 depending upon your system (please check the streamlit terminal). You can access it most probably with the following link: http://localhost:8501/ or http://127.0.0.1:8501/


Streamlit Cloud Deployment

The web app has been deployed on Streamlit Cloud. You can go ahead and check it out on the following link:
https://share.streamlit.io/wakarhassanalvi/time-series-anomaly-detection/web_app/frontend.py

For each of the Isolation Forest, LOF and STL Decomposition - this web app makes requests to Heroku Endpoints of each of the API's to get the anomalies as response.

Heroku Deployment

For each of the models i.e. Isolation Forest, LOF and STL Decomposition - we have deployed 3 API's for each model on Heroku. The Heroku endpoints for each of the models are listed below:

1. For Isolation Forest - https://ts-anomaly-detection-if.herokuapp.com/docs
2. For LOF - https://ts-anomaly-detection-lof.herokuapp.com/docs
3. For STL Decomposition - https://ts-anomaly-detection-stl.herokuapp.com/docs

The deployed Streamlit Cloud Web App makes the API calls to these Heroku API endpoints to get the anomalies. If you want to check these endpoints individually, just click on the respective endpoint and try out the post method by uploading the test csv file.

anomaly_detection's People

Contributors

jacer7 avatar

Stargazers

 avatar Mairene Sumalague avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.