Giter Site home page Giter Site logo

cluschurn's Introduction

ClusChurn

A prototype implementation of ClusChurn based on PyTorch.

  1. preprocess.py: Preprocess messaging, discover and lens activity data in the data folder to generate act_data.pkl and link_data.pkl it can also draws daily activity and link plots input: data downloaded from google bigquery output: data.pkl: list of 2-d np array (dayact /1510)

  2. fit.py: Feature engeering. Computes means and lags of activity data, fit by kmeans and draw the plots input: data.pkl output: params.pkl: 3-d np array (#user*#act2) churns.pkl: 1-d np array (#user) labels.pkl: labels: 2-d np array (#act#user), centers: 3-d np array (#actk2) it also generates param, mixed and single plots of all activities

  3. kmeans.py (helper function) Kmeans with automatic selection of k

  4. evaluate.py (helper function) Computation of f1, jc and nmi scores between two clustering results

  5. cross.py Visualize the correlations among activities input: labels.pkl output: cross.txt (values in the grid plots of correlations)

  6. multiview.py - our main clustering pipeline in the paper Every user is replaced by its nearest cluster center, show the most significant combinations. The number of clusters K is automatically chosen. input: labels.pkl output: multiview.txt: K outstanding clusters soft.pkl: soft labels of users to clusters based on t-distribution (#users*K)

  7. link.py evaluate link smoothing intuitions, compute the portion of linked same-type users input: linkset.txt, multiview.pkl output: print out portion of linked same-type users

  8. regress.py baseline algorithms for performance comparison input: act_data.pkl, churn.pkl output: accuracy, precision and recall of churn prediction

  9. model.py - our main prediction pipeline in the paper parallel lstm model -- a simplified implementation with pooling. input: act_data.pkl, churn.pkl output: accuracy, precision and recall of churn prediction

  10. core.py find the core and evaluate its overlap with new users' friends input: core_user, core_friend, core_degree (raw data from big query extraction) output: print out percentage of friends in core, save the degree distribution figure

cluschurn's People

Contributors

aosifhosduig 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.