Skip to content

anantaw81/clust-backend

Repository files navigation

CLUST backend

What is this?

  • Clust is clustering (in customer segmentation) platform. Started from thesis assigment.
  • At the moment, clust using k-medoids and gap statistic to provide customer segment with model RFMD showing all labeling possibility and next action.
  • Documentation : Google Docs

How this project is organize?

  • core: py notebook, csv, cleaning
  • repository: database
  • services: fetching from external api
  • routes: controller
  • storage: all images, files
  • dataset: example data for clustering
  • test: just testing code

How is this project routing ?

  • routes --> usecases(optional) --> services/repository/core

Clustering step

  • Step 1 = rawdata router - import and visualization
  • Step 2 = modeling router - rfmd table, gap statistic, visualization
  • Step 3 = clustering router - clustering, visualization
  • Step 4 = detail router - showing table.

How to run this project?

  • Make sure python3 is installed
  • Import the databases from 'database/sunrise.dump'
  • Set connection port in '.env'
  • Run command below
    • python -m venv
    • \Scripts\activate
    • pip install -r requirements.txt
    • python -m uvicorn main:app --reload (for next, just run this code)

Tricks?

  • if using global, not env and want to run without script "python -m"
  • ** in windows, add to path C:\Users%Username%\AppData\Roaming\Python\Python311\Scripts\ for using uvicorn main:app --reload
  • pip freeze > requirements.txt (saving installed library)

Credit: anantaw81 (PLEASE DO NOT COPY THIS PROJECT WITHOUT PERMISSION)