Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

R Notes

Customer Churn Prediction Exercise

Link 1: (https://rpubs.com/ezrasote/churn)

1) General Linear Logistic Regression Model


2) Decision Tree
3) Random Forest
4) Ggplot functionality and graphing
5) Key Next Step: Print Correlation matrix of data
a. Perform VIF function

Customer Churn Grouping Code Example

Link: (https://www.kaggle.com/blastchar/predict-customer-churn-lr-dt-and-rf/notebook)

1) Use line 7 code for example of grouping mechanism using for loop
a. Essentially adds in a column of data that segments existing data
b. Their correlation output is also a bit better

Cohort Analysis & Retention Rate

Link 2: (https://medium.com/datascape/cohort-analysis-retention-rate-visualization-in-r-9cccaf821b49)

1) Chart design outputs for retention rates

RFM Analysis (Recency, Frequency and Monetary)

Link 3: (https://www.pluralsight.com/guides/implementing-marketing-analytics-in-r)

1) Can re-frame RFM analysis for utilization rate analysis to understand recency, frequency and the
magnitude of utilization (proxy for $ spend)
2) Sqldf function in R for RFM analysis
3) Analysis more to drive understanding for is vs. predictive power

Clustering Analysis

Link 4: (https://www.pluralsight.com/guides/implementing-marketing-analytics-in-r-part-2)

1) Used for customer segmentation analysis


2)
Statology Tutorials

1) R Guides:
a. https://www.statology.org/r-guides/
2) Machine Learning
a. https://www.statology.org/machine-learning-tutorials/

Dimension Reduction in R

Link: https://rpubs.com/Saskia/520216

Causal Inference Book with R Code Examples:

Link: https://mixtape.scunning.com/index.html

University of Cincinnati R Business Analytics Packge

Link: http://uc-r.github.io/

General Notes:

1) Logistic vs. Linear Regression


a. Logistic used for binary variables (Yes/No)
b. Linear used for continuous variables
2) Polynomial Regression
a. Used for non-linear examples (see scatterplot and see what outputs looks like)

Differences Between Linear And Logistic Regression


 
 Linear regression is used for predicting the continuous dependent
variable using a given set of independent features whereas Logistic
Regression is used to predict the categorical.
 Linear regression is used to solve regression problems whereas logistic
regression is used to solve classification problems.
 In Linear regression, the approach is to find the best fit line to predict
the output whereas in the Logistic regression approach is to try for S
curved graphs that classify between the two classes that are 0 and 1.
 The method for accuracy in linear regression is the least square
estimation whereas for logistic regression it is maximum likelihood
estimation. 
 In Linear regression, the output should be continuous like price & age,
whereas in Logistic regression the output must be categorical like either
Yes / No or 0/1.
 There should be a linear relationship between the dependent and
independent features in the case of Linear regression whereas it is not
in the case of Logistic regression.
 There can be collinearity between independent features in the case of
linear regression but it is not in the case of logistic regression.

You might also like