Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Feb 23rd, 2018 63 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. library(tidyverse)
  2. library(readr)
  3. library(FNN)
  4. library(rpart)
  5. library(C50)
  6. library(nnet)
  7. library(FME)
  8.    
  9. for (i in 1:length(churn$Churn.)) {
  10.   if(churn$State[i]== "CT" | churn$State[i]== "DE"| churn$State[i]== "FL" | churn$State[i]== "GA" | churn$State[i]== "IN" | churn$State[i]== "ME" | churn$State[i]== "MD" | churn$State[i]== "MA" |churn$State[i]== "MI" |churn$State[i]== "NH" |churn$State[i]== "NJ" | churn$State[i]== "NY" |churn$State[i]== "NC" | churn$State[i]== "OH" |churn$State[i]== "PA" |churn$State[i]== "RI" |churn$State[i]== "SC" | churn$State[i]== "VT" | churn$State[i]== "VA" |churn$State[i]== "DC" | churn$State[i]== "WV" ) {
  11.     churn$state.cat.east[i]<-1
  12.   } else {
  13.     churn$state.cat.east[i]<-0
  14.   }
  15. }
  16.  
  17. for (i in 1:length(churn$Churn.)) {
  18.   if(churn$State[i]== "AL" | churn$State[i]== "AR" | churn$State[i]== "IL" | churn$State[i]== "IA" | churn$State[i]== "KS" | churn$State[i]== "KY" | churn$State[i]== "LA" | churn$State[i]== "MN" | churn$State[i]== "MS" | churn$State[i]== "MO" | churn$State[i]== "NE" | churn$State[i]== "ND" | churn$State[i]== "OK" | churn$State[i]== "SD" | churn$State[i]== "TN" | churn$State[i]== "TX" | churn$State[i]== "WI" ) {
  19.     churn$state.cat.central[i]<-1
  20.   } else {
  21.     churn$state.cat.central[i]<-0
  22.   }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top