Informations

Il s’agit d’un extrait de la formation. Cette formation peut se faire en présentiel ou à distance. Pour en savoir plus, merci de me contacter.

1 Import des données

Structure

## 'data.frame':    7043 obs. of  21 variables:
##  $ customerID      : Factor w/ 7043 levels "0002-ORFBO","0003-MKNFE",..: 5376 3963 2565 5536 6512 6552 1003 4771 5605 4535 ...
##  $ gender          : Factor w/ 2 levels "Female","Male": 1 2 2 2 1 1 2 1 1 2 ...
##  $ SeniorCitizen   : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ Partner         : Factor w/ 2 levels "No","Yes": 2 1 1 1 1 1 1 1 2 1 ...
##  $ Dependents      : Factor w/ 2 levels "No","Yes": 1 1 1 1 1 1 2 1 1 2 ...
##  $ tenure          : int  1 34 2 45 2 8 22 10 28 62 ...
##  $ PhoneService    : Factor w/ 2 levels "No","Yes": 1 2 2 1 2 2 2 1 2 2 ...
##  $ MultipleLines   : Factor w/ 3 levels "No","No phone service",..: 2 1 1 2 1 3 3 2 3 1 ...
##  $ InternetService : Factor w/ 3 levels "DSL","Fiber optic",..: 1 1 1 1 2 2 2 1 2 1 ...
##  $ OnlineSecurity  : Factor w/ 3 levels "No","No internet service",..: 1 3 3 3 1 1 1 3 1 3 ...
##  $ OnlineBackup    : Factor w/ 3 levels "No","No internet service",..: 3 1 3 1 1 1 3 1 1 3 ...
##  $ DeviceProtection: Factor w/ 3 levels "No","No internet service",..: 1 3 1 3 1 3 1 1 3 1 ...
##  $ TechSupport     : Factor w/ 3 levels "No","No internet service",..: 1 1 1 3 1 1 1 1 3 1 ...
##  $ StreamingTV     : Factor w/ 3 levels "No","No internet service",..: 1 1 1 1 1 3 3 1 3 1 ...
##  $ StreamingMovies : Factor w/ 3 levels "No","No internet service",..: 1 1 1 1 1 3 1 1 3 1 ...
##  $ Contract        : Factor w/ 3 levels "Month-to-month",..: 1 2 1 2 1 1 1 1 1 2 ...
##  $ PaperlessBilling: Factor w/ 2 levels "No","Yes": 2 1 2 1 2 2 2 1 2 1 ...
##  $ PaymentMethod   : Factor w/ 4 levels "Bank transfer (automatic)",..: 3 4 4 1 3 3 2 4 3 1 ...
##  $ MonthlyCharges  : Factor w/ 1585 levels "100","100.05",..: 447 803 741 571 1034 1579 1380 445 91 787 ...
##  $ TotalCharges    : Factor w/ 6531 levels " ","100.2","100.25",..: 2506 1467 158 1401 926 6105 1551 2610 2647 3023 ...
##  $ Churn           : Factor w/ 2 levels "No","Yes": 1 1 2 1 2 2 1 1 2 1 ...

On peut utiliser d’autres fonctions pour mieux explorer les données.

2 Nettoyage des données

## 
## Bank transfer\nautomatic   Credit card\nautomatic         Electronic check 
##                     1544                     1522                     2365 
##             Mailed check 
##                     1612

3 Données catégoriques

3.1 Variable PaymentMethod

3.2 Variable Contract

3.3 Variable OnlineBackup

3.4 Variable InternetService

4 Données numériques

4.1 Densité

4.1.1 Variable tenure

4.1.2 Variable MonthlyCharges

4.1.3 Variable TotalCharges

4.2 Boxplot

4.2.1 Variable tenure

4.2.2 Variable MonthlyCharges

4.2.3 Variable TotalCharges

4.3 Violin plot

4.3.1 Variable tenure

4.3.2 Variable MonthlyCharges

4.3.3 Variable TotalCharges

5 Variables numériques multiples

## 'data.frame':    3 obs. of  3 variables:
##  $ Var1: chr  "tenure" "tenure" "MonthlyCharges"
##  $ Var2: chr  "TotalCharges" "MonthlyCharges" "TotalCharges"
##  $ Freq: num  0.15852 -0.07715 -0.00863
##  - attr(*, "na.action")=Class 'omit'  Named int [1:6] 1 2 3 5 6 9
##   .. ..- attr(*, "names")= chr [1:6] "1" "2" "3" "5" ...

5.1 Relation 1

5.2 Relation 2

5.3 Relation 3