Friday 24 April 2020

GitHub - GitFlow , Feature and Development Branches , Push , Pull Request ( Coding Partners Intro )

This is specially written for the Coding Partners , our GitHub Repo - https://github.com/digital-cognition-co-in/DigitalCognition

You are requested to create a Branch so that you can complete your task and push the code . Steps to follow -

1/ Create a Local Clone - In an empty directory initialize a Git Repo.

$git init
Initialized empty Git repository in /media/dhankar/Dhankar_1/a2_20/kMeans/.git/
$git clone - https://github.com/digital-cognition-co-in/DigitalCognition.git
Cloning into 'DigitalCognition'...
Username for 'https://github.com': RohitDhankar
Password for 'https://RohitDhankar@github.com':
remote: Enumerating objects: 5887, done.
remote: Counting objects: 100% (5887/5887), done.
remote: Compressing objects: 100% (4012/4012), done.
remote: Total 5887 (delta 1580), reused 5867 (delta 1566), pack-reused 0
Receiving objects: 100% (5887/5887), 19.59 MiB | 5.94 MiB/s, done.
Resolving deltas: 100% (1580/1580), done.
Checking connectivity... done.


If required - $ cd DigitalCognition/

2/ Check the GIT STATUS - it should show that you are on BRANCH == MASTER
$ git status 
On branch master
Initial commit


3/ Check the Remote Branches  - this will show you all the BRANCHES created by others in your team . 

$ git branch -a
* develop
  master
  remotes/origin/Akshat
  remotes/origin/HEAD -> origin/master
  remotes/origin/Rohan
  remotes/origin/avirup
  remotes/origin/develop
  remotes/origin/master
 

4/ When you are 100% sure that you are on the BRANCH == DEVELOP , and can see the ASTERIX *develop  , you now need to create your own DEVELOPMENT BRANCH , which will track changes from the REMOTE Branch DEVELOP .Name your Branch as ---  

dev_yourFirstName_yourLastName

$ git checkout -b dev_rohit_dhankar
$ git branch -a
* dev_rohit_dhankar
  develop
  master
  remotes/origin/Akshat
  remotes/origin/HEAD -> origin/master
  remotes/origin/Rohan
  remotes/origin/avirup
  remotes/origin/dev_rohit
  remotes/origin/develop
  remotes/origin/master


5/ Once your  - dev_yourFirstName_yourLastName , Branch is created , you work on the task you are working on , once the task is complete , you can push the code to your branch on remote as seen below . 

$ git add .
$ git commit -m"App:dc_dash:utility_eda_only-Browser_storage__Client-side_storage"
[dev_rohit_dhankar 02cb376] App:dc_dash:utility_eda_only-Browser_storage__Client-side_storage
 1 file changed, 9 insertions(+), 5 deletions(-)


 6/ After pushing your code - create a New PULL REQUEST , this is as seen in the screencapture below .
 




After creating the NEW PULL REQUEST , compare changes with your -  dev_yourFirstName_yourLastName , Branch and the DEVELOP branch ,



 
 













$ git checkout -b develop

 Switched to a new branch 'develop'

$ git status
On branch develop
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
 

$ git add .
$ git commit -m"init_churn_app"
[develop 3a1452b] init_churn_app
 29 files changed, 18 insertions(+)
 create mode 100644 churn_app/__init__.py
 create mode 100644 churn_app/admin.py
 create mode 100644 churn_app/apps.py
 create mode 100644 churn_app/migrations/__init__.py
 create mode 100644 churn_app/models.py
 create mode 100644 churn_app/tests.py
 create mode 100644 churn_app/views.py
 rewrite dc_dash_proj/__pycache__/settings.cpython-35.pyc (83%)
 rewrite dc_dash_proj/__pycache__/urls.cpython-35.pyc (85%)


$ git push -u origin develop
Counting objects: 36, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (36/36), 71.88 KiB | 0 bytes/s, done.
Total 36 (delta 10), reused 0 (delta 0)
remote: Resolving deltas: 100% (10/10), completed with 8 local objects.
remote:
remote: Create a pull request for 'develop' on GitHub by visiting:
remote:      https://github.com/digital-cognition-co-in/DigitalCognition/pull/new/develop
remote:
To https://github.com/digital-cognition-co-in/DigitalCognition.git
 * [new branch]      develop -> develop
Branch develop set up to track remote branch develop from origin.






Various Source --  https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
https://gist.github.com/blackfalcon/8428401#make-sure-you-are-on-master
https://git-scm.com/docs/git-pull
https://www.atlassian.com/git/tutorials/using-branches

Saturday 11 April 2020

CLV - Customer Lifetime Value

We need to understand the linkage between - Churn Analysis and CLV - Customer Lifetime Value . Churn analysis will help us find - which are the Customers who are most likely to leave our organization , its derived from Survival Analysis .CLV - Customer Lifetime Value will help us find which are the most valued Customers that we have . When we know who are our most valued Customers - we can easily focus on them and work out strategies to prevent their CHURN ( Exit from the Customer base )In this project - for now simply called Churn Analysis - we are focusing on creating an application SaaS offering , where we ingress data from a Client Company / Org , and predict the High Churn risk or High Flight risk customers.This platform needs to be designed such that we can cater to many organizations and provide them Churn Analytics for their Customers to begin with and maybe later also predict Churn for their internal stakeholders - their employees .

Further reading -  

1/ Churn Analysis -- https://josepcurtodiaz.gitbooks.io/customer-analytics-with-r/content/chapter9.html

https://www.r-bloggers.com/churn-analysis-part-1-model-selection/

https://towardsdatascience.com/predict-customer-churn-with-r-9e62357d47b4 

https://lukesingham.com/how-to-make-a-churn-model-in-r/ 

http://rstudio-pubs-static.s3.amazonaws.com/425842_7f6b2293079f4a5d8fc7d62aeac2a545.html 

https://www.dataoptimal.com/churn-prediction-with-r/ 

https://www.kaggle.com/ajayohri/churn-using-various-algorithms-in-r-rattle 

https://rpubs.com/newajay/simpletextmining 

RStats - CRAN - Churn analysis --- 

https://cran.r-project.org/web/packages/BTYD/vignettes/BTYD-walkthrough.pdf 

https://jtsulliv.github.io/churn-eda/ 

https://cran.r-project.org/web/packages/BTYDplus/vignettes/BTYDplus-HowTo.pdf 

https://cran.r-project.org/web/packages/correlationfunnel/vignettes/introducing_correlation_funnel.html 

https://cran.r-project.org/web/packages/C50/C50.pdf 

https://cran.r-project.org/web/packages/SMCRM/SMCRM.pdf 

https://cran.r-project.org/web/packages/EMP/EMP.pdf

http://rstudio-pubs-static.s3.amazonaws.com/443094_bc2c15d74e7e4b7b96d8fc95f3162b08.html 
 


2/  Survival Analysis
https://towardsdatascience.com/survival-analysis-part-a-70213df21c2e 
 

3/ CLV - Customer Lifetime Value
https://www.coursera.org/lecture/foundations-marketing-analytics/computing-customer-lifetime-value-in-r-recital-3-CFVVr 

https://stats.stackexchange.com/questions/20463/rfm-customer-lifetime-value-modeling-in-r

https://josepcurtodiaz.gitbooks.io/customer-analytics-with-r/content/chapter3.html 


https://rpubs.com/hoakevinquach/Customer-Lifetime-Value-CLV

Estimating individual Customer Lifetime Values with R: The CLVTools Package -- https://www.youtube.com/watch?v=KJCYjjWNgLM 

Customer Lifetime Value (CLV) on R --- https://www.youtube.com/watch?v=8YEgdi4QxkY

https://medium.com/ordergroove-engineering/every-customer-counts-52aa70e4f85

https://www.r-bloggers.com/calculating-customer-lifetime-value-with-recency-frequency-and-monetary-rfm/