Teoría

Agrupamiento o clustering es una técnica de aprendizaje automático no supervisado que agrupa datos en función de su similitud.

Algunos usos típicos de esta técnico son:

  • Segmentación de clientes.
  • Detección de anormalidades.
  • Categorización de documentos.

Instalar paquetes y llamar librerías

#install.packages("cluster") # análisis de agrupamiento
library(cluster) 

#install.packages("ggplot2") # graficar
library(ggplot2)

#install.packages("data.table") # manejo de muchos datos
library(data.table)

#install.packages("factoextra") # gráfica de optimización del número de clusters
library(factoextra) 

#install.packages("tidyverse")
library(tidyverse)

Ejercicio 1: Puntos

Contexto

Agrupa los siguientes 8 puntos

Obtener datos

df1 <- data.frame(x=c(2,2,8,5,7,6,1,4), y=c(10,5,4,8,5,4,2,9)) 

Entender datos

summary(df1)
##        x               y         
##  Min.   :1.000   Min.   : 2.000  
##  1st Qu.:2.000   1st Qu.: 4.000  
##  Median :4.500   Median : 5.000  
##  Mean   :4.375   Mean   : 5.875  
##  3rd Qu.:6.250   3rd Qu.: 8.250  
##  Max.   :8.000   Max.   :10.000
str(df1) 
## 'data.frame':    8 obs. of  2 variables:
##  $ x: num  2 2 8 5 7 6 1 4
##  $ y: num  10 5 4 8 5 4 2 9
plot(df1$x,df1$y)

Escalar datos

# datos_escalados <- scale(datos_originales) 

Asignar número de grupos

grupo1 <- 3

Agrupar los puntos

set.seed(123)
clusters1 <- kmeans(df1,grupo1) 
clusters1
## K-means clustering with 3 clusters of sizes 2, 3, 3
## 
## Cluster means:
##          x        y
## 1 1.500000 3.500000
## 2 3.666667 9.000000
## 3 7.000000 4.333333
## 
## Clustering vector:
## [1] 2 1 3 2 3 3 1 2
## 
## Within cluster sum of squares by cluster:
## [1] 5.000000 6.666667 2.666667
##  (between_SS / total_SS =  85.8 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"

Optimizar número de grupos

set.seed(123)
optimizacion1 <- clusGap(df1, FUN=kmeans, nstart=1, K.max = 7) 
# El K.max normalmente es 10, en este jercicio al ser de 8 datos se dejó en 7. 
plot(optimizacion1, xlab = "Número de clusters K", main = "Optimización de Clusters")  

# Se selecciona como óptimo el primer punto más alto 
# Si es diferente al original, regresar y ajustar

Graficar los grupos

fviz_cluster(clusters1, data = df1) 

Agregar grupos a la base de datos

df1_clusters <- cbind(df1, cluster= clusters1$cluster) 
head(df1_clusters) 
##   x  y cluster
## 1 2 10       2
## 2 2  5       1
## 3 8  4       3
## 4 5  8       2
## 5 7  5       3
## 6 6  4       3

Conclusiones

La técnica de clustering permite identificar patrones o grupos naturales en los datos sin necesidad de etiquetas previas.

Ejercicio 2: USArrests

Contexto

La base de datos USArrests contiene estadísticas en arrestos por cada 100,000 residentes por agresión, asesinatos y violación en cada uno de los 50 estados de EE.UU en 1973.

Obtener datos

df2 <- USArrests
df2 <- df2 %>% select(-UrbanPop) 

Entender datos

summary(df2)
##      Murder          Assault           Rape      
##  Min.   : 0.800   Min.   : 45.0   Min.   : 7.30  
##  1st Qu.: 4.075   1st Qu.:109.0   1st Qu.:15.07  
##  Median : 7.250   Median :159.0   Median :20.10  
##  Mean   : 7.788   Mean   :170.8   Mean   :21.23  
##  3rd Qu.:11.250   3rd Qu.:249.0   3rd Qu.:26.18  
##  Max.   :17.400   Max.   :337.0   Max.   :46.00
str(df2)
## 'data.frame':    50 obs. of  3 variables:
##  $ Murder : num  13.2 10 8.1 8.8 9 7.9 3.3 5.9 15.4 17.4 ...
##  $ Assault: int  236 263 294 190 276 204 110 238 335 211 ...
##  $ Rape   : num  21.2 44.5 31 19.5 40.6 38.7 11.1 15.8 31.9 25.8 ...

Escalar datos

df2_escalados <- scale(df2)
summary(df2_escalados)
##      Murder           Assault             Rape        
##  Min.   :-1.6044   Min.   :-1.5090   Min.   :-1.4874  
##  1st Qu.:-0.8525   1st Qu.:-0.7411   1st Qu.:-0.6574  
##  Median :-0.1235   Median :-0.1411   Median :-0.1209  
##  Mean   : 0.0000   Mean   : 0.0000   Mean   : 0.0000  
##  3rd Qu.: 0.7949   3rd Qu.: 0.9388   3rd Qu.: 0.5277  
##  Max.   : 2.2069   Max.   : 1.9948   Max.   : 2.6444

Asignar número de grupos

grupo2 <- 5

Agrupar los puntos

set.seed(123)
clusters2 <- kmeans(df2_escalados,grupo2) 
clusters2
## K-means clustering with 5 clusters of sizes 7, 14, 17, 4, 8
## 
## Cluster means:
##       Murder    Assault        Rape
## 1  0.8292944  1.3313823  0.90560938
## 2 -1.0812577 -1.0779212 -1.00700542
## 3 -0.2754591 -0.2999280 -0.12336985
## 4  0.4562038  0.9358314  2.26533514
## 5  1.5238170  0.8908337  0.09934463
## 
## Clustering vector:
##        Alabama         Alaska        Arizona       Arkansas     California 
##              5              4              1              3              4 
##       Colorado    Connecticut       Delaware        Florida        Georgia 
##              4              2              3              1              5 
##         Hawaii          Idaho       Illinois        Indiana           Iowa 
##              2              2              1              3              2 
##         Kansas       Kentucky      Louisiana          Maine       Maryland 
##              3              3              5              2              1 
##  Massachusetts       Michigan      Minnesota    Mississippi       Missouri 
##              3              1              2              5              3 
##        Montana       Nebraska         Nevada  New Hampshire     New Jersey 
##              3              2              4              2              3 
##     New Mexico       New York North Carolina   North Dakota           Ohio 
##              1              1              5              2              3 
##       Oklahoma         Oregon   Pennsylvania   Rhode Island South Carolina 
##              3              3              3              2              5 
##   South Dakota      Tennessee          Texas           Utah        Vermont 
##              2              5              5              3              2 
##       Virginia     Washington  West Virginia      Wisconsin        Wyoming 
##              3              3              2              2              3 
## 
## Within cluster sum of squares by cluster:
## [1] 3.380664 5.645542 9.205038 1.346517 4.683603
##  (between_SS / total_SS =  83.5 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"

Optimizar número de grupos

set.seed(123)
optimizacion2 <- clusGap(df2_escalados, FUN=kmeans, nstart=1, K.max = 10) 
# El K.max normalmente es 10, en este jercicio al ser de 8 datos se dejó en 7. 
plot(optimizacion2, xlab = "Número de clusters K", main = "Optimización de Clusters")  

# Se selecciona como óptimo el primer punto más alto 
# Si es diferente al original, regresar y ajustar

Graficar los grupos

fviz_cluster(clusters2, data = df2_escalados) 

Agregar grupos a la base de datos

df2_clusters <- cbind(df2, cluster = clusters2$cluster)
head(df2_clusters)
##            Murder Assault Rape cluster
## Alabama      13.2     236 21.2       5
## Alaska       10.0     263 44.5       4
## Arizona       8.1     294 31.0       1
## Arkansas      8.8     190 19.5       3
## California    9.0     276 40.6       4
## Colorado      7.9     204 38.7       4
df2_clusters %>% group_by(cluster) %>% summarise_all(mean) %>%
  mutate(indicador_inseguridad=Murder+Assault+Rape)
## # A tibble: 5 × 5
##   cluster Murder Assault  Rape indicador_inseguridad
##     <int>  <dbl>   <dbl> <dbl>                 <dbl>
## 1       1  11.4    282.   29.7                 323. 
## 2       2   3.08    80.9  11.8                  95.8
## 3       3   6.59   146.   20.1                 172. 
## 4       4   9.78   249.   42.4                 301. 
## 5       5  14.4    245    22.2                 282.
df2_clusters <- df2_clusters  %>%
  mutate(cluster= case_when(
    cluster == 1 ~ "Inseguridad Muy Alta",
    cluster == 4 ~ "Inseguridad Alta",
    cluster == 5 ~ "Inseguridad Media",
    cluster == 3 ~ "Inseguridad Baja",
    cluster == 2 ~ "Inseguridad Muy Baja"
  ))
head(df2_clusters) 
##            Murder Assault Rape              cluster
## Alabama      13.2     236 21.2    Inseguridad Media
## Alaska       10.0     263 44.5     Inseguridad Alta
## Arizona       8.1     294 31.0 Inseguridad Muy Alta
## Arkansas      8.8     190 19.5     Inseguridad Baja
## California    9.0     276 40.6     Inseguridad Alta
## Colorado      7.9     204 38.7     Inseguridad Alta

Ejercicio 3: Segmentación de clientes

Contexto

La base de datos ventas tiene los registros entre el 1 de diciembre de 2010 y el 9 de diciembre de 2011 de las ventas de una empresa minorista en línea sin tienda física, basada en Reino Unido. La empresa vende principalmente regalos únicos para toda ocasión, y muchos de sus clientes son mayoristas. Objetivo: Segmentar clientes, asignarles nombre y características de comportamiento, y proponer sugerencias a la empresa para aumentar ventas.

Obtener datos

# Cargar el archivo con codificación UTF-8 para evitar caracteres especiales en los nombres de columnas 
df3_normal <- read.csv("/Users/danaraesparzamacias/Desktop/ventas.csv", encoding = "UTF-8")

Renombrar columna de Ticket si es necesario, eliminar registros sin ID de cliente

# eliminar devoluciones (Cantidad <= 0) y precios inválidos
df3_limpio <- df3_normal %>%
  rename(Ticket = colnames(df3_normal)[1]) %>%
  filter(!is.na(Cliente), Cantidad > 0, Precio > 0) %>%
  mutate(
    Fecha = as.Date(Fecha, format = "%d/%m/%Y"),
    MontoTotal = Cantidad * Precio
  )

Construcción de métricas RFM

fecha_referencia <- max(df3_limpio$Fecha) + 1

df3_rfm <- df3_limpio %>%
  group_by(Cliente) %>%
  summarise(
    Recencia = as.numeric(fecha_referencia - max(Fecha)), # Días desde la última compra
    Frecuencia = n_distinct(Ticket),                       # Número total de compras
    Monto = sum(MontoTotal)                                # Gasto total acumulado
  ) %>%
  column_to_rownames("Cliente")

Entender datos

summary(df3_rfm)
##     Recencia        Frecuencia          Monto          
##  Min.   :  1.00   Min.   :  1.000   Min.   :     3.75  
##  1st Qu.: 18.00   1st Qu.:  1.000   1st Qu.:   306.72  
##  Median : 51.00   Median :  2.000   Median :   668.85  
##  Mean   : 93.16   Mean   :  4.227   Mean   :  1993.61  
##  3rd Qu.:143.00   3rd Qu.:  5.000   3rd Qu.:  1652.79  
##  Max.   :374.00   Max.   :209.000   Max.   :280206.02
str(df3_rfm)
## 'data.frame':    4296 obs. of  3 variables:
##  $ Recencia  : num  326 3 19 311 37 205 233 215 23 34 ...
##  $ Frecuencia: int  1 7 1 1 8 1 1 1 3 1 ...
##  $ Monto     : num  77184 4310 1758 334 2506 ...
pairs(df3_rfm, main = "Matriz de Dispersión RFM")

Escalar datos

df3_escalados <- scale(df3_rfm)
summary(df3_escalados)
##     Recencia         Frecuencia          Monto         
##  Min.   :-0.9202   Min.   :-0.4556   Min.   :-0.23167  
##  1st Qu.:-0.7504   1st Qu.:-0.4556   1st Qu.:-0.19640  
##  Median :-0.4209   Median :-0.3144   Median :-0.15424  
##  Mean   : 0.0000   Mean   : 0.0000   Mean   : 0.00000  
##  3rd Qu.: 0.4977   3rd Qu.: 0.1092   3rd Qu.:-0.03968  
##  Max.   : 2.8042   Max.   :28.9132   Max.   :32.39138

Asignar número de grupos

grupo3 <- 3

Agrupar los puntos

set.seed(123)
clusters3 <- kmeans(df3_escalados, grupo3)
clusters3
## K-means clustering with 3 clusters of sizes 3189, 25, 1082
## 
## Cluster means:
##     Recencia  Frecuencia       Monto
## 1 -0.5146028  0.06646886 -0.01604087
## 2 -0.7376401  7.71679726  9.31252168
## 3  1.5337425 -0.37420435 -0.16789161
## 
## Clustering vector:
## 12346 12347 12349 12350 12352 12353 12354 12355 12356 12357 12358 12360 12361 
##     2     1     1     3     1     3     3     3     1     1     1     1     3 
## 12362 12363 12364 12370 12371 12373 12374 12377 12378 12379 12380 12381 12383 
##     1     1     1     3     1     3     1     3     1     1     1     1     3 
## 12384 12386 12388 12390 12393 12394 12395 12397 12398 12399 12401 12402 12407 
##     1     3     1     1     1     3     1     1     1     1     3     3     1 
## 12408 12409 12410 12413 12414 12415 12417 12418 12421 12422 12423 12424 12425 
##     1     1     3     1     3     2     1     1     1     1     1     3     1 
## 12426 12427 12429 12430 12431 12432 12433 12434 12436 12437 12438 12441 12442 
##     3     1     3     1     1     1     1     1     1     1     1     3     1 
## 12444 12445 12446 12447 12448 12449 12450 12451 12452 12453 12454 12455 12456 
##     1     1     1     3     1     1     3     1     1     1     1     1     1 
## 12457 12458 12461 12462 12463 12464 12465 12468 12471 12472 12473 12474 12475 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 12476 12477 12478 12479 12480 12481 12483 12484 12488 12489 12490 12491 12492 
##     1     1     1     1     1     1     1     1     1     3     1     1     1 
## 12493 12494 12497 12498 12500 12501 12502 12504 12506 12507 12508 12509 12510 
##     3     1     1     1     1     3     1     1     3     1     1     3     3 
## 12512 12513 12514 12515 12516 12517 12518 12519 12520 12521 12522 12523 12524 
##     1     1     3     3     1     1     1     1     1     3     1     1     1 
## 12526 12527 12528 12530 12531 12532 12534 12535 12536 12538 12539 12540 12541 
##     1     1     1     1     1     1     1     1     1     1     1     1     1 
## 12544 12545 12546 12547 12548 12550 12551 12552 12553 12556 12557 12558 12559 
##     1     1     1     3     3     1     3     1     1     1     1     1     3 
## 12560 12561 12562 12564 12565 12566 12567 12569 12571 12572 12573 12574 12576 
##     1     3     1     3     3     1     1     1     1     1     3     3     1 
## 12577 12578 12579 12580 12581 12583 12584 12585 12586 12589 12590 12591 12592 
##     1     1     1     3     1     1     1     3     1     1     3     3     1 
## 12593 12594 12596 12597 12598 12599 12600 12601 12602 12603 12604 12607 12609 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 12610 12611 12612 12613 12614 12615 12616 12617 12618 12619 12620 12621 12622 
##     1     1     1     1     3     1     1     1     1     1     1     1     3 
## 12623 12624 12625 12626 12627 12628 12633 12635 12637 12638 12639 12640 12641 
##     3     1     3     1     1     1     1     1     1     1     3     1     1 
## 12642 12643 12644 12645 12646 12647 12648 12649 12650 12651 12652 12653 12654 
##     1     1     1     1     1     1     3     1     1     3     3     3     1 
## 12656 12657 12658 12659 12660 12662 12665 12668 12669 12670 12672 12673 12674 
##     1     1     1     1     1     1     3     1     3     1     3     1     1 
## 12676 12678 12679 12680 12681 12682 12683 12684 12685 12686 12688 12689 12690 
##     1     1     1     1     1     1     1     1     1     3     1     1     3 
## 12691 12693 12694 12695 12697 12700 12701 12702 12703 12705 12707 12708 12709 
##     1     1     1     1     1     1     1     1     1     1     3     1     1 
## 12710 12712 12713 12714 12715 12716 12717 12718 12719 12720 12721 12722 12723 
##     1     1     1     1     1     1     3     1     1     1     1     1     1 
## 12724 12725 12726 12727 12728 12729 12731 12732 12733 12734 12735 12736 12738 
##     1     3     1     1     1     1     1     3     3     3     3     3     3 
## 12739 12740 12743 12744 12747 12748 12749 12750 12752 12753 12754 12755 12756 
##     1     1     1     1     1     2     1     1     1     1     3     3     1 
## 12757 12758 12759 12762 12763 12764 12766 12769 12770 12772 12775 12778 12779 
##     1     1     1     1     1     3     1     3     3     1     1     1     1 
## 12782 12783 12784 12785 12787 12789 12790 12791 12792 12793 12794 12795 12797 
##     1     1     1     3     1     1     3     3     3     3     1     1     3 
## 12798 12802 12808 12809 12811 12812 12814 12815 12816 12817 12818 12820 12821 
##     1     3     1     3     3     1     1     3     1     3     3     1     3 
## 12822 12823 12824 12826 12827 12828 12829 12830 12831 12832 12833 12834 12836 
##     1     1     1     1     1     1     3     1     3     1     3     3     1 
## 12837 12838 12839 12840 12841 12842 12843 12844 12845 12847 12849 12851 12852 
##     3     1     1     1     1     1     1     1     3     1     1     1     3 
## 12853 12854 12855 12856 12857 12863 12864 12865 12866 12867 12868 12871 12872 
##     1     1     3     1     3     1     3     1     3     1     3     1     3 
## 12873 12875 12876 12877 12878 12879 12881 12882 12883 12884 12885 12886 12888 
##     3     3     1     1     3     1     3     1     1     1     1     1     3 
## 12890 12891 12893 12895 12897 12901 12902 12904 12906 12908 12909 12910 12912 
##     1     3     1     1     3     1     3     1     1     3     1     1     1 
## 12913 12915 12916 12917 12919 12920 12921 12922 12923 12924 12925 12928 12929 
##     1     3     1     1     1     1     1     3     1     1     1     1     3 
## 12930 12931 12933 12935 12936 12937 12938 12939 12940 12942 12944 12945 12947 
##     1     1     1     1     1     1     1     1     1     1     1     3     1 
## 12948 12949 12950 12951 12952 12953 12955 12956 12957 12962 12963 12965 12966 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 12967 12968 12970 12971 12974 12976 12977 12980 12981 12982 12984 12985 12987 
##     3     1     1     2     3     3     3     1     1     3     1     1     1 
## 12988 12989 12990 12991 12993 12994 12995 12997 12999 13000 13001 13002 13003 
##     3     1     1     1     1     1     1     1     3     1     1     3     1 
## 13004 13005 13006 13008 13011 13012 13013 13014 13015 13016 13017 13018 13021 
##     1     3     1     3     3     1     1     1     1     1     1     1     1 
## 13023 13026 13027 13028 13029 13030 13032 13033 13034 13035 13037 13038 13040 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 13043 13044 13045 13046 13047 13048 13049 13050 13052 13055 13058 13059 13060 
##     3     3     1     1     1     1     1     1     3     1     1     3     3 
## 13061 13062 13064 13065 13066 13067 13068 13069 13070 13072 13075 13077 13078 
##     1     3     1     3     1     1     1     1     3     3     1     1     1 
## 13079 13080 13081 13082 13083 13085 13089 13090 13091 13092 13093 13094 13095 
##     1     3     1     1     1     3     2     1     1     1     3     1     1 
## 13097 13098 13099 13101 13102 13103 13104 13106 13107 13108 13109 13110 13113 
##     1     1     1     3     1     1     1     1     1     3     1     1     1 
## 13115 13116 13117 13118 13120 13121 13122 13124 13126 13127 13130 13131 13132 
##     1     3     1     1     3     3     1     1     1     1     1     1     3 
## 13133 13134 13135 13136 13137 13138 13139 13140 13141 13142 13144 13145 13146 
##     3     1     3     1     1     1     1     1     1     1     3     1     1 
## 13147 13148 13149 13151 13153 13155 13157 13158 13159 13160 13161 13162 13165 
##     1     1     1     3     1     1     1     1     1     1     3     1     1 
## 13166 13167 13168 13169 13170 13171 13173 13174 13176 13177 13178 13182 13183 
##     3     1     1     1     1     1     1     1     1     1     1     1     1 
## 13184 13185 13186 13187 13188 13189 13192 13193 13194 13196 13198 13199 13200 
##     1     3     1     3     1     1     1     1     1     1     1     1     1 
## 13203 13207 13208 13209 13210 13211 13212 13213 13216 13217 13218 13220 13221 
##     1     1     1     1     1     1     1     1     3     1     1     1     3 
## 13223 13224 13225 13226 13227 13228 13229 13230 13232 13233 13235 13236 13238 
##     3     1     1     3     3     1     3     1     1     1     3     1     1 
## 13239 13240 13242 13243 13244 13245 13246 13247 13248 13249 13253 13255 13258 
##     3     1     1     3     1     1     1     1     1     1     3     1     1 
## 13259 13260 13261 13262 13263 13265 13266 13267 13268 13269 13270 13271 13272 
##     1     1     3     3     1     1     1     1     1     1     3     1     1 
## 13273 13276 13277 13278 13279 13280 13282 13283 13284 13285 13291 13292 13294 
##     1     1     1     1     1     1     1     1     3     1     3     1     3 
## 13295 13296 13297 13298 13299 13300 13301 13302 13304 13305 13307 13308 13309 
##     3     3     1     1     3     3     1     3     3     1     1     1     1 
## 13310 13311 13313 13314 13316 13317 13318 13319 13320 13321 13322 13323 13324 
##     1     1     1     1     1     1     1     1     1     1     1     1     1 
## 13325 13327 13328 13329 13330 13332 13334 13336 13338 13339 13340 13341 13343 
##     1     1     3     1     1     1     1     1     3     3     1     3     3 
## 13344 13345 13347 13348 13349 13350 13351 13352 13354 13355 13356 13357 13358 
##     1     3     1     1     1     1     1     1     1     1     1     3     3 
## 13359 13362 13363 13364 13365 13366 13368 13369 13370 13372 13373 13375 13376 
##     1     1     1     1     1     1     3     3     3     1     1     1     1 
## 13379 13381 13382 13384 13385 13388 13389 13390 13391 13394 13395 13396 13397 
##     1     1     3     1     3     1     1     1     3     1     3     1     1 
## 13398 13402 13403 13404 13405 13408 13410 13411 13414 13416 13417 13418 13419 
##     3     1     1     1     1     2     1     1     1     1     1     1     1 
## 13420 13421 13422 13425 13426 13427 13428 13429 13430 13431 13434 13435 13436 
##     3     1     1     1     1     1     1     1     1     1     1     1     1 
## 13437 13439 13441 13447 13448 13449 13450 13451 13452 13453 13455 13456 13458 
##     1     3     1     1     1     1     1     1     3     3     1     1     1 
## 13460 13461 13462 13464 13466 13467 13468 13470 13471 13473 13474 13475 13476 
##     1     1     3     1     3     1     1     1     1     1     3     3     3 
## 13477 13479 13481 13482 13483 13484 13485 13486 13487 13488 13489 13491 13492 
##     1     3     1     3     1     3     3     1     1     1     1     1     1 
## 13493 13494 13495 13496 13497 13499 13500 13501 13502 13503 13504 13505 13506 
##     3     3     1     1     3     1     1     3     1     1     1     1     3 
## 13507 13508 13509 13510 13512 13513 13514 13515 13516 13517 13518 13519 13520 
##     1     3     1     1     3     1     1     1     1     1     1     1     1 
## 13521 13522 13523 13524 13525 13527 13529 13531 13532 13533 13534 13536 13538 
##     1     1     1     1     1     1     1     3     1     3     1     1     1 
## 13539 13544 13546 13548 13549 13551 13552 13555 13557 13558 13560 13561 13562 
##     1     1     1     1     1     3     1     1     1     1     1     3     1 
## 13563 13564 13565 13566 13568 13569 13570 13571 13572 13573 13575 13576 13577 
##     1     3     1     1     3     1     3     1     3     1     1     1     1 
## 13579 13581 13583 13584 13587 13588 13589 13590 13591 13592 13593 13594 13596 
##     1     3     3     3     1     1     1     1     1     1     1     1     1 
## 13598 13599 13600 13601 13602 13603 13606 13607 13610 13611 13614 13615 13617 
##     1     1     3     1     1     1     1     1     1     1     1     3     1 
## 13618 13621 13623 13626 13627 13629 13630 13631 13632 13634 13635 13636 13637 
##     3     1     1     3     1     1     1     1     1     1     1     1     1 
## 13638 13639 13642 13643 13644 13645 13647 13649 13650 13651 13652 13654 13655 
##     1     1     3     1     1     1     1     3     1     1     1     1     1 
## 13656 13657 13658 13659 13662 13663 13666 13667 13668 13669 13670 13672 13673 
##     3     1     1     3     1     3     1     3     1     1     1     3     1 
## 13675 13678 13680 13681 13682 13684 13685 13686 13689 13690 13692 13694 13695 
##     3     3     1     1     3     3     1     3     1     1     1     2     1 
## 13697 13699 13700 13703 13704 13705 13706 13707 13708 13709 13710 13711 13712 
##     1     3     1     3     1     1     3     3     3     1     1     3     3 
## 13715 13716 13717 13718 13719 13720 13721 13722 13723 13725 13726 13727 13728 
##     3     3     1     3     1     1     1     1     3     1     1     1     1 
## 13730 13731 13732 13735 13736 13737 13739 13740 13741 13742 13743 13744 13745 
##     1     3     1     1     1     3     1     3     1     1     1     1     3 
## 13747 13748 13750 13751 13752 13753 13754 13755 13756 13758 13759 13760 13761 
##     3     1     1     3     1     3     3     1     1     1     1     1     1 
## 13762 13763 13764 13767 13769 13771 13772 13774 13777 13778 13780 13781 13782 
##     3     1     1     1     1     1     1     1     1     1     1     3     1 
## 13784 13786 13787 13790 13791 13792 13798 13799 13800 13801 13802 13803 13804 
##     1     3     1     1     1     1     2     1     3     1     1     3     1 
## 13805 13806 13807 13808 13810 13811 13812 13813 13814 13815 13816 13817 13819 
##     1     1     3     1     1     3     1     1     1     1     1     1     3 
## 13821 13822 13823 13824 13826 13827 13828 13831 13832 13833 13835 13837 13838 
##     3     1     1     1     3     1     1     1     1     3     1     3     1 
## 13841 13842 13844 13845 13846 13848 13849 13850 13851 13853 13854 13856 13858 
##     3     1     1     1     1     1     1     1     1     1     1     3     1 
## 13859 13860 13862 13863 13865 13866 13867 13868 13869 13870 13871 13873 13874 
##     3     1     1     3     1     1     1     1     1     1     1     1     3 
## 13875 13876 13877 13878 13880 13881 13882 13883 13884 13885 13886 13887 13888 
##     1     1     1     1     1     1     1     1     1     3     1     3     1 
## 13889 13890 13892 13893 13894 13895 13897 13898 13899 13900 13901 13904 13908 
##     1     1     1     3     1     1     1     3     1     3     1     1     1 
## 13911 13914 13917 13918 13922 13923 13924 13925 13926 13927 13928 13929 13930 
##     1     1     1     1     3     1     1     1     1     1     1     3     1 
## 13931 13932 13933 13934 13936 13937 13938 13939 13940 13941 13946 13947 13948 
##     1     3     1     3     3     3     1     1     1     1     1     1     3 
## 13949 13950 13951 13952 13953 13954 13955 13956 13959 13960 13962 13963 13967 
##     1     1     3     3     1     1     3     1     1     1     1     3     3 
## 13969 13971 13972 13973 13974 13975 13976 13978 13979 13980 13982 13983 13984 
##     1     1     1     3     1     1     3     1     1     1     1     1     1 
## 13985 13986 13988 13989 13990 13991 13992 13993 13994 13995 13999 14000 14001 
##     1     1     1     1     3     1     1     1     1     1     1     3     1 
## 14002 14004 14005 14006 14009 14012 14013 14014 14015 14019 14020 14021 14022 
##     1     1     1     1     3     3     1     1     1     1     1     3     3 
## 14023 14024 14027 14029 14030 14031 14032 14034 14035 14036 14037 14038 14039 
##     1     1     1     1     1     1     1     1     1     3     3     1     1 
## 14040 14041 14044 14045 14046 14047 14048 14049 14050 14051 14052 14053 14054 
##     1     3     1     1     3     1     3     1     1     1     1     1     1 
## 14055 14056 14057 14059 14060 14062 14064 14066 14067 14068 14071 14073 14075 
##     1     1     1     3     1     1     1     3     1     3     1     1     1 
## 14076 14077 14078 14079 14080 14081 14082 14083 14085 14087 14088 14089 14090 
##     1     1     1     1     1     3     3     1     1     1     1     1     3 
## 14092 14093 14096 14098 14099 14100 14101 14102 14104 14105 14107 14108 14109 
##     1     1     2     1     1     3     1     1     3     3     1     1     1 
## 14110 14111 14112 14113 14114 14116 14117 14121 14124 14125 14126 14127 14128 
##     1     1     1     1     3     1     3     1     1     1     1     1     1 
## 14129 14130 14132 14133 14135 14138 14139 14140 14141 14142 14143 14145 14146 
##     1     3     1     1     1     1     1     1     1     3     1     1     1 
## 14147 14148 14149 14150 14152 14154 14155 14157 14158 14159 14161 14162 14163 
##     1     3     3     1     1     3     3     1     1     1     3     3     1 
## 14164 14165 14167 14171 14173 14174 14175 14176 14177 14178 14179 14180 14184 
##     1     3     1     1     1     1     1     3     1     1     1     1     1 
## 14185 14188 14189 14191 14193 14194 14195 14196 14198 14199 14201 14204 14205 
##     3     1     1     1     1     1     3     1     1     3     1     1     1 
## 14206 14208 14209 14210 14211 14212 14214 14215 14216 14217 14218 14219 14220 
##     3     1     1     1     1     1     1     1     1     1     1     1     3 
## 14221 14222 14223 14224 14226 14227 14229 14231 14232 14233 14234 14235 14236 
##     1     3     1     1     1     1     1     3     1     1     1     1     1 
## 14237 14238 14239 14240 14241 14242 14243 14245 14246 14247 14248 14250 14251 
##     3     3     1     1     3     3     1     3     1     3     3     1     1 
## 14256 14257 14258 14259 14261 14262 14264 14265 14267 14270 14271 14272 14273 
##     3     1     1     3     1     1     3     1     3     3     3     1     1 
## 14276 14277 14280 14282 14284 14285 14286 14287 14288 14289 14290 14291 14292 
##     1     1     3     1     1     1     1     1     3     1     1     1     1 
## 14293 14295 14297 14298 14299 14300 14301 14304 14305 14306 14307 14309 14311 
##     1     1     1     2     1     1     1     3     1     1     1     1     3 
## 14312 14314 14315 14317 14320 14321 14323 14326 14327 14329 14331 14332 14333 
##     1     1     1     1     3     1     1     3     3     1     1     1     1 
## 14334 14335 14336 14338 14339 14340 14341 14342 14344 14345 14346 14348 14349 
##     1     1     1     3     3     3     1     1     1     1     1     3     1 
## 14350 14351 14352 14353 14354 14355 14356 14357 14359 14360 14362 14364 14367 
##     3     3     3     3     1     3     1     1     1     1     1     1     1 
## 14368 14371 14373 14375 14377 14379 14381 14382 14383 14385 14386 14387 14388 
##     3     3     3     3     3     1     1     1     1     1     3     1     1 
## 14389 14390 14393 14395 14396 14397 14400 14401 14403 14404 14406 14407 14408 
##     1     1     3     1     1     1     3     1     1     1     1     1     1 
## 14409 14410 14411 14412 14413 14414 14415 14416 14418 14419 14420 14421 14422 
##     1     1     3     1     3     1     1     1     1     1     1     1     1 
## 14423 14424 14426 14427 14428 14431 14432 14434 14436 14437 14438 14439 14440 
##     3     1     1     1     1     3     1     1     1     3     3     3     1 
## 14441 14443 14446 14447 14448 14449 14450 14451 14452 14453 14456 14457 14459 
##     1     1     1     1     1     1     3     1     1     3     1     3     3 
## 14460 14461 14462 14463 14465 14466 14467 14470 14472 14473 14474 14475 14476 
##     1     3     1     1     3     1     1     1     1     1     1     1     3 
## 14477 14479 14480 14481 14482 14483 14484 14485 14487 14488 14489 14491 14493 
##     1     3     1     3     1     3     1     1     1     1     3     3     1 
## 14494 14495 14496 14497 14498 14499 14500 14501 14502 14503 14504 14505 14506 
##     1     1     3     3     1     1     1     3     1     1     1     1     1 
## 14507 14508 14511 14512 14513 14514 14515 14517 14518 14520 14522 14523 14524 
##     1     1     1     3     1     1     1     1     1     1     1     1     1 
## 14525 14527 14528 14529 14530 14532 14533 14534 14535 14536 14537 14538 14539 
##     1     1     1     1     1     3     1     1     1     3     1     1     1 
## 14540 14541 14542 14543 14544 14546 14547 14548 14549 14550 14551 14552 14553 
##     1     1     3     1     1     1     1     3     3     1     1     3     1 
## 14554 14555 14557 14560 14561 14562 14565 14567 14569 14570 14572 14573 14576 
##     1     1     1     1     1     1     1     1     1     3     1     3     3 
## 14577 14578 14581 14582 14583 14584 14585 14586 14587 14589 14591 14592 14593 
##     1     1     1     1     1     3     1     3     1     3     1     1     1 
## 14594 14595 14597 14598 14600 14601 14603 14606 14607 14608 14609 14616 14618 
##     1     1     1     1     3     1     3     2     1     1     1     3     1 
## 14619 14620 14621 14622 14623 14624 14625 14626 14628 14629 14631 14632 14633 
##     3     3     1     3     1     1     3     1     1     1     1     3     3 
## 14636 14638 14639 14640 14641 14642 14643 14644 14645 14646 14647 14649 14651 
##     1     1     1     1     1     1     3     1     3     2     3     1     1 
## 14652 14653 14655 14656 14657 14658 14659 14660 14661 14662 14664 14665 14666 
##     1     1     1     3     1     1     1     1     1     1     1     1     1 
## 14667 14669 14670 14672 14673 14675 14676 14680 14681 14682 14684 14687 14688 
##     1     3     3     3     1     1     1     1     1     3     1     1     1 
## 14689 14690 14691 14692 14693 14696 14697 14698 14699 14700 14701 14702 14703 
##     3     1     1     1     3     1     3     1     3     1     1     1     1 
## 14704 14705 14708 14709 14710 14711 14712 14713 14714 14715 14716 14719 14720 
##     1     3     1     1     1     1     1     1     1     1     1     1     1 
## 14722 14723 14725 14727 14729 14730 14731 14732 14733 14735 14737 14738 14739 
##     3     1     1     3     3     1     1     1     1     1     1     1     1 
## 14740 14741 14744 14745 14747 14748 14752 14753 14754 14755 14756 14757 14758 
##     3     1     1     1     3     1     1     1     1     1     1     1     1 
## 14759 14760 14761 14762 14764 14765 14766 14768 14769 14770 14772 14775 14776 
##     1     3     1     3     1     1     1     1     1     3     1     1     1 
## 14778 14779 14780 14782 14784 14785 14788 14789 14790 14792 14793 14794 14795 
##     1     3     1     3     1     1     1     1     1     1     1     1     3 
## 14796 14798 14799 14800 14801 14803 14804 14805 14806 14808 14810 14813 14815 
##     1     1     1     1     1     3     1     1     1     1     1     3     1 
## 14816 14817 14818 14819 14820 14821 14823 14824 14825 14828 14829 14830 14834 
##     3     3     1     1     1     3     3     1     1     3     1     1     1 
## 14836 14837 14840 14841 14842 14844 14847 14849 14850 14851 14852 14853 14854 
##     1     1     3     1     1     1     3     1     3     1     1     1     1 
## 14855 14856 14857 14859 14860 14861 14862 14863 14865 14866 14867 14868 14869 
##     1     1     1     1     1     1     1     1     1     1     3     1     1 
## 14870 14871 14873 14875 14878 14880 14881 14882 14883 14885 14886 14887 14888 
##     3     1     3     1     1     1     1     1     1     1     3     1     3 
## 14889 14890 14891 14893 14894 14895 14896 14897 14898 14901 14902 14903 14904 
##     3     3     3     1     1     1     3     1     1     1     1     1     1 
## 14905 14907 14908 14910 14912 14913 14915 14916 14918 14920 14921 14923 14924 
##     3     1     1     1     1     1     1     1     1     3     1     1     3 
## 14929 14944 14946 14947 14948 14950 14951 14952 14953 14954 14957 14958 14959 
##     1     1     1     1     1     1     1     1     1     1     3     3     1 
## 14960 14961 14962 14963 14964 14965 14966 14967 14968 14970 14971 14972 14973 
##     1     1     3     1     3     1     1     1     1     1     1     1     1 
## 14974 14975 14976 14978 14981 14984 14985 14987 14988 14995 14997 14998 15000 
##     1     1     1     1     3     1     3     1     3     1     1     3     1 
## 15002 15004 15005 15006 15007 15009 15010 15012 15014 15016 15017 15018 15019 
##     1     3     1     1     3     1     1     1     1     3     1     1     3 
## 15021 15022 15023 15024 15025 15026 15027 15028 15030 15031 15032 15033 15034 
##     1     1     1     1     1     1     1     1     1     1     3     1     1 
## 15035 15036 15038 15039 15041 15042 15043 15044 15045 15046 15047 15048 15049 
##     1     1     1     1     3     3     1     1     3     1     3     1     3 
## 15050 15051 15052 15053 15054 15057 15058 15059 15060 15061 15062 15063 15065 
##     1     1     3     1     1     3     1     1     1     2     1     3     1 
## 15066 15067 15068 15069 15070 15071 15073 15074 15075 15076 15078 15079 15081 
##     1     1     1     3     3     1     1     1     1     3     1     3     1 
## 15083 15087 15088 15089 15090 15091 15092 15093 15095 15096 15097 15098 15099 
##     3     3     1     1     3     1     3     1     1     1     1     3     1 
## 15100 15101 15103 15104 15105 15106 15107 15109 15110 15111 15113 15114 15115 
##     3     1     1     3     1     1     3     3     1     1     1     1     1 
## 15116 15117 15118 15119 15120 15121 15122 15123 15124 15125 15127 15128 15129 
##     1     1     1     3     1     1     1     1     1     1     1     1     1 
## 15130 15132 15133 15134 15135 15136 15139 15140 15142 15143 15144 15145 15146 
##     3     1     1     1     3     1     3     1     1     3     1     1     3 
## 15147 15148 15149 15150 15152 15153 15154 15156 15157 15158 15159 15160 15163 
##     3     1     1     1     1     1     1     1     1     1     1     3     1 
## 15164 15165 15167 15168 15171 15172 15174 15175 15178 15179 15180 15181 15182 
##     1     3     3     1     3     1     3     1     3     1     3     1     3 
## 15184 15185 15186 15187 15189 15192 15193 15194 15195 15197 15198 15199 15201 
##     1     1     1     1     1     1     1     1     1     1     1     1     1 
## 15203 15204 15205 15206 15208 15210 15211 15212 15213 15214 15215 15216 15218 
##     1     3     1     1     1     3     1     3     3     1     1     1     1 
## 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15230 15232 15234 
##     3     1     3     3     3     3     3     3     1     1     3     1     3 
## 15235 15236 15237 15238 15239 15240 15241 15243 15244 15245 15246 15247 15249 
##     3     3     1     1     1     1     1     1     1     1     3     1     1 
## 15251 15252 15253 15254 15255 15256 15257 15258 15260 15261 15262 15263 15264 
##     1     1     1     1     1     3     3     3     1     1     3     1     1 
## 15265 15266 15267 15269 15270 15271 15272 15274 15275 15276 15277 15279 15280 
##     3     3     1     1     1     1     1     1     1     1     1     3     3 
## 15281 15286 15287 15288 15289 15290 15291 15292 15296 15297 15298 15299 15300 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 15301 15303 15304 15306 15307 15308 15311 15312 15313 15314 15315 15316 15318 
##     1     3     1     1     1     3     2     1     1     3     1     3     1 
## 15319 15320 15321 15322 15325 15326 15327 15329 15330 15332 15333 15334 15335 
##     3     1     1     1     1     3     1     1     1     3     3     3     1 
## 15339 15341 15342 15343 15344 15345 15346 15347 15348 15349 15350 15351 15353 
##     1     1     1     1     1     1     3     3     1     3     3     1     3 
## 15355 15356 15358 15360 15361 15363 15364 15365 15366 15367 15368 15370 15372 
##     1     1     1     1     3     3     1     1     1     1     1     1     1 
## 15373 15374 15376 15379 15380 15381 15382 15384 15385 15386 15389 15392 15393 
##     1     1     1     3     1     3     1     3     1     3     3     1     1 
## 15394 15395 15396 15397 15398 15399 15400 15402 15405 15406 15407 15408 15410 
##     1     3     1     3     1     1     1     3     3     1     1     3     1 
## 15411 15412 15414 15415 15416 15417 15419 15421 15422 15423 15424 15426 15427 
##     1     3     1     3     1     1     1     1     3     1     3     1     1 
## 15428 15429 15432 15433 15434 15435 15436 15437 15438 15440 15442 15443 15444 
##     1     1     1     3     1     1     1     3     1     1     3     1     1 
## 15445 15447 15448 15449 15450 15452 15453 15454 15456 15457 15458 15460 15462 
##     3     3     3     1     1     1     1     3     3     3     1     3     1 
## 15463 15464 15465 15466 15467 15468 15469 15471 15472 15473 15475 15478 15480 
##     1     3     1     1     1     1     1     1     1     1     1     1     1 
## 15482 15483 15484 15485 15488 15489 15491 15492 15493 15494 15497 15498 15500 
##     1     3     1     1     1     1     1     1     1     1     1     1     1 
## 15502 15503 15504 15505 15506 15507 15508 15510 15511 15512 15513 15514 15516 
##     1     3     1     1     1     3     3     3     1     3     1     1     1 
## 15517 15518 15520 15521 15522 15523 15524 15525 15526 15527 15528 15529 15530 
##     3     1     1     1     1     1     1     1     1     1     3     1     1 
## 15531 15532 15533 15535 15537 15539 15540 15541 15543 15544 15545 15547 15549 
##     1     1     1     3     3     1     1     1     3     1     1     1     1 
## 15550 15551 15552 15553 15554 15555 15556 15557 15561 15562 15563 15565 15567 
##     1     1     3     1     3     1     1     1     1     3     1     1     1 
## 15568 15569 15570 15571 15572 15573 15574 15576 15577 15578 15579 15581 15582 
##     1     1     1     1     1     1     3     1     3     3     1     1     1 
## 15584 15585 15587 15589 15592 15593 15594 15596 15597 15598 15599 15601 15602 
##     1     3     1     3     1     1     1     1     1     1     1     1     1 
## 15603 15604 15605 15606 15607 15608 15609 15610 15611 15612 15615 15618 15619 
##     1     1     1     1     3     1     3     1     1     1     1     1     1 
## 15620 15621 15622 15623 15624 15625 15626 15628 15630 15632 15634 15636 15637 
##     1     1     1     3     1     1     1     1     1     1     1     1     1 
## 15639 15640 15641 15643 15644 15645 15646 15648 15649 15651 15652 15653 15654 
##     1     1     1     3     3     1     3     3     3     1     1     1     1 
## 15655 15656 15657 15658 15659 15660 15661 15663 15664 15665 15667 15668 15669 
##     3     1     1     3     1     1     3     1     1     3     1     3     1 
## 15670 15671 15673 15674 15675 15676 15677 15678 15679 15680 15681 15683 15687 
##     3     1     1     1     1     1     1     1     1     1     1     1     1 
## 15689 15690 15691 15692 15694 15695 15696 15699 15700 15701 15703 15704 15705 
##     1     1     3     1     1     3     1     1     3     1     3     1     3 
## 15706 15707 15708 15709 15712 15713 15714 15716 15717 15719 15720 15721 15722 
##     1     1     1     3     1     3     1     1     3     1     1     1     1 
## 15723 15724 15725 15727 15729 15730 15732 15733 15734 15737 15738 15739 15740 
##     3     3     1     1     3     1     3     3     1     1     1     1     1 
## 15743 15744 15745 15746 15747 15748 15749 15750 15752 15753 15754 15755 15756 
##     1     1     1     1     1     1     3     1     1     3     1     1     1 
## 15757 15758 15759 15762 15763 15764 15766 15768 15769 15773 15774 15775 15776 
##     1     1     3     1     1     1     1     1     2     1     1     3     1 
## 15777 15780 15781 15782 15783 15785 15786 15787 15789 15790 15791 15793 15795 
##     3     3     1     1     1     1     1     1     3     1     1     1     3 
## 15796 15797 15799 15800 15801 15802 15803 15804 15805 15806 15807 15808 15809 
##     1     1     1     1     1     3     1     1     1     1     1     3     1 
## 15810 15811 15812 15813 15814 15815 15819 15820 15821 15822 15823 15825 15826 
##     1     1     1     3     1     1     1     3     1     1     3     3     1 
## 15827 15829 15830 15831 15832 15834 15835 15836 15837 15838 15839 15840 15841 
##     1     1     1     1     3     1     1     1     1     1     1     1     1 
## 15843 15844 15845 15847 15850 15852 15853 15854 15855 15856 15857 15858 15860 
##     3     1     1     1     1     3     1     1     1     1     1     1     1 
## 15861 15862 15863 15864 15865 15866 15867 15869 15870 15872 15874 15877 15880 
##     1     1     1     1     1     1     1     3     1     1     1     1     3 
## 15881 15882 15883 15885 15886 15888 15889 15891 15894 15895 15897 15898 15899 
##     3     3     1     1     1     1     3     3     3     3     3     1     3 
## 15900 15901 15903 15904 15906 15907 15909 15910 15912 15916 15917 15918 15919 
##     1     1     1     1     1     1     3     1     3     1     3     3     1 
## 15920 15921 15922 15923 15925 15930 15932 15933 15935 15937 15938 15939 15940 
##     3     3     3     3     3     1     1     1     3     1     1     1     3 
## 15942 15944 15945 15947 15948 15949 15950 15951 15952 15953 15955 15957 15958 
##     1     3     3     1     1     1     1     1     1     1     1     1     1 
## 15963 15965 15967 15969 15970 15971 15973 15974 15975 15976 15977 15978 15980 
##     1     1     1     1     3     1     3     1     1     3     1     1     1 
## 15981 15983 15984 15985 15986 15987 15988 15990 15992 15993 15994 15996 15998 
##     1     1     1     1     1     1     1     1     1     1     1     1     1 
## 16000 16003 16005 16006 16007 16008 16009 16010 16011 16012 16013 16014 16015 
##     1     1     1     3     1     1     1     3     1     1     2     1     1 
## 16016 16017 16018 16019 16020 16022 16023 16024 16025 16026 16027 16029 16030 
##     1     1     1     1     1     3     1     1     1     1     1     2     3 
## 16031 16033 16034 16036 16037 16038 16040 16041 16042 16043 16045 16048 16049 
##     1     1     3     1     3     1     1     1     1     1     1     3     1 
## 16050 16052 16053 16054 16055 16056 16057 16059 16062 16063 16065 16066 16070 
##     3     1     1     3     3     1     1     1     1     3     3     1     1 
## 16071 16072 16073 16076 16078 16079 16080 16081 16083 16084 16085 16086 16091 
##     1     3     3     1     3     1     1     1     1     3     1     1     3 
## 16092 16093 16094 16096 16097 16098 16099 16101 16102 16103 16104 16105 16106 
##     1     1     1     3     3     1     1     1     1     1     1     3     1 
## 16107 16108 16109 16110 16112 16113 16114 16115 16116 16117 16119 16120 16121 
##     1     1     3     1     1     3     3     1     3     3     1     1     1 
## 16122 16123 16124 16125 16126 16127 16128 16131 16133 16134 16135 16136 16139 
##     1     1     3     3     1     1     1     1     1     1     3     1     1 
## 16140 16141 16142 16143 16144 16145 16146 16147 16148 16149 16150 16152 16153 
##     1     1     3     1     3     1     3     1     3     1     1     3     1 
## 16156 16157 16159 16160 16161 16162 16163 16164 16168 16169 16170 16171 16172 
##     1     1     3     1     1     3     3     1     1     1     1     1     1 
## 16173 16174 16175 16177 16178 16179 16180 16181 16182 16183 16184 16185 16186 
##     1     1     1     1     3     1     1     1     1     1     1     1     1 
## 16187 16188 16189 16190 16191 16193 16198 16200 16201 16202 16203 16204 16205 
##     1     1     1     1     1     3     1     1     1     3     1     1     1 
## 16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 
##     1     1     1     1     1     1     1     1     3     1     3     3     1 
## 16221 16222 16224 16225 16226 16227 16229 16230 16232 16233 16235 16236 16239 
##     1     3     1     1     3     3     1     3     1     1     1     1     1 
## 16240 16241 16242 16243 16244 16245 16247 16248 16249 16250 16253 16255 16256 
##     1     1     1     1     3     1     3     1     1     3     1     1     3 
## 16257 16258 16260 16261 16265 16266 16268 16270 16271 16272 16274 16275 16276 
##     3     1     1     1     1     1     1     3     1     1     3     3     3 
## 16278 16279 16281 16282 16283 16284 16287 16292 16293 16295 16297 16298 16302 
##     1     1     1     3     1     1     3     1     1     1     3     1     1 
## 16303 16305 16306 16308 16309 16311 16313 16315 16316 16317 16318 16319 16320 
##     1     3     3     1     1     1     1     3     1     1     1     3     3 
## 16321 16322 16323 16324 16325 16326 16327 16330 16332 16333 16337 16338 16339 
##     1     1     3     1     1     1     1     1     1     1     1     3     3 
## 16340 16341 16342 16343 16344 16345 16347 16348 16349 16350 16351 16352 16353 
##     1     1     1     1     3     1     1     1     3     1     3     1     1 
## 16354 16356 16357 16358 16359 16360 16361 16362 16363 16364 16365 16366 16367 
##     1     3     1     1     1     1     1     1     1     1     1     1     1 
## 16368 16369 16370 16372 16374 16376 16377 16378 16379 16380 16383 16384 16385 
##     1     1     1     1     1     1     3     3     1     1     1     1     1 
## 16386 16387 16389 16392 16393 16394 16395 16398 16399 16400 16401 16402 16403 
##     1     3     1     3     1     1     1     3     1     1     1     3     3 
## 16404 16405 16406 16407 16409 16411 16412 16413 16414 16415 16416 16418 16419 
##     1     3     1     1     1     1     1     1     1     1     1     1     1 
## 16422 16423 16424 16425 16426 16427 16429 16430 16431 16432 16433 16434 16438 
##     2     1     3     3     1     3     1     1     3     1     1     1     1 
## 16440 16441 16442 16444 16445 16446 16447 16448 16449 16450 16451 16454 16455 
##     1     1     1     1     1     2     1     3     3     3     1     1     1 
## 16456 16457 16458 16460 16461 16462 16463 16464 16466 16468 16469 16470 16471 
##     1     3     1     1     3     1     1     1     1     1     1     1     3 
## 16473 16474 16475 16477 16478 16479 16480 16482 16483 16484 16485 16488 16491 
##     3     1     1     1     1     1     1     1     3     3     1     1     1 
## 16493 16494 16495 16496 16497 16498 16499 16500 16503 16504 16505 16506 16509 
##     1     3     1     1     1     3     3     1     1     1     1     1     3 
## 16510 16511 16513 16515 16516 16517 16518 16519 16520 16523 16525 16526 16527 
##     3     1     1     1     1     3     1     1     3     1     1     3     1 
## 16528 16529 16531 16532 16533 16535 16536 16539 16542 16545 16546 16549 16550 
##     1     3     1     1     1     1     1     1     1     3     3     1     1 
## 16551 16552 16553 16554 16555 16556 16557 16558 16560 16561 16563 16565 16566 
##     1     3     1     1     1     1     1     1     1     1     1     3     1 
## 16567 16569 16570 16571 16572 16573 16574 16581 16582 16583 16584 16586 16587 
##     3     1     1     1     1     1     1     3     1     3     1     3     3 
## 16589 16591 16592 16593 16594 16595 16596 16597 16598 16600 16601 16602 16603 
##     1     1     1     1     1     1     1     1     3     1     1     1     1 
## 16607 16609 16610 16611 16612 16613 16614 16616 16617 16618 16619 16620 16621 
##     1     1     3     3     1     1     3     1     3     1     3     1     1 
## 16623 16624 16625 16626 16627 16628 16629 16633 16634 16637 16638 16639 16641 
##     3     1     3     1     1     1     1     1     3     1     1     1     1 
## 16642 16643 16644 16647 16648 16650 16652 16653 16654 16655 16656 16657 16658 
##     1     3     3     3     1     1     1     1     1     1     1     1     3 
## 16659 16660 16665 16666 16667 16668 16669 16670 16671 16672 16674 16676 16678 
##     3     1     3     1     1     1     1     1     1     1     1     1     1 
## 16679 16680 16681 16682 16684 16685 16686 16688 16689 16690 16692 16693 16696 
##     3     1     1     1     2     1     1     1     1     1     3     1     1 
## 16697 16698 16700 16701 16705 16706 16708 16709 16710 16711 16712 16713 16714 
##     3     3     1     1     1     1     1     1     1     1     1     1     3 
## 16715 16716 16717 16718 16719 16720 16721 16722 16723 16725 16726 16727 16728 
##     1     3     1     3     1     1     3     1     1     3     1     3     1 
## 16729 16730 16732 16734 16735 16737 16738 16739 16742 16743 16744 16745 16746 
##     1     1     1     1     1     1     3     3     1     1     1     1     1 
## 16747 16748 16750 16751 16752 16753 16754 16755 16756 16757 16758 16759 16761 
##     1     1     1     1     3     1     3     1     3     3     1     1     1 
## 16762 16763 16764 16765 16766 16767 16768 16769 16770 16771 16773 16774 16775 
##     1     3     1     3     3     1     1     3     1     1     1     1     1 
## 16776 16777 16778 16779 16780 16781 16782 16784 16788 16789 16790 16791 16792 
##     1     1     1     1     1     3     1     1     1     1     1     1     3 
## 16793 16794 16795 16796 16800 16801 16803 16804 16805 16806 16807 16808 16809 
##     1     1     3     1     1     3     1     1     3     1     1     1     1 
## 16810 16811 16812 16813 16814 16816 16817 16818 16820 16823 16824 16825 16826 
##     3     1     3     1     1     1     1     1     1     3     1     1     1 
## 16828 16829 16830 16832 16833 16834 16835 16836 16837 16838 16839 16841 16842 
##     1     3     1     3     1     3     1     1     1     3     1     1     1 
## 16843 16846 16847 16848 16849 16850 16851 16852 16855 16856 16858 16859 16861 
##     1     1     1     1     3     3     1     1     1     1     3     3     1 
## 16863 16866 16869 16871 16872 16873 16875 16877 16878 16880 16881 16882 16883 
##     1     1     1     1     1     1     1     1     1     1     1     1     3 
## 16884 16885 16887 16889 16891 16892 16893 16895 16897 16898 16899 16900 16902 
##     1     1     1     3     1     1     3     1     3     1     1     1     1 
## 16903 16904 16905 16906 16907 16909 16910 16912 16913 16914 16915 16916 16917 
##     1     1     1     1     1     1     1     1     3     1     1     1     3 
## 16918 16919 16921 16923 16924 16926 16927 16928 16929 16930 16931 16932 16933 
##     1     1     1     1     1     3     1     1     1     1     1     1     1 
## 16934 16936 16938 16940 16942 16943 16945 16947 16948 16949 16950 16951 16952 
##     1     1     1     1     1     3     1     3     1     1     1     1     1 
## 16953 16954 16955 16956 16957 16959 16960 16961 16963 16965 16966 16967 16968 
##     1     1     3     1     3     1     1     1     3     3     1     3     1 
## 16969 16971 16976 16978 16979 16980 16982 16983 16984 16985 16986 16987 16988 
##     1     1     3     1     1     3     1     1     1     1     1     1     1 
## 16989 16990 16992 16996 16997 16998 16999 17001 17002 17004 17006 17007 17010 
##     1     3     1     1     3     3     1     1     1     1     1     1     1 
## 17011 17014 17015 17017 17018 17019 17022 17024 17025 17026 17027 17029 17030 
##     1     1     1     1     1     1     1     1     1     3     1     1     1 
## 17031 17033 17034 17035 17037 17038 17040 17041 17042 17043 17044 17045 17046 
##     1     1     1     3     1     1     3     1     1     1     1     1     3 
## 17047 17048 17049 17050 17051 17052 17053 17054 17058 17059 17060 17061 17062 
##     1     1     1     1     3     1     1     1     1     1     3     1     3 
## 17063 17064 17068 17069 17070 17071 17073 17075 17076 17078 17079 17080 17081 
##     1     1     1     1     1     1     1     1     1     1     1     1     1 
## 17082 17083 17084 17085 17086 17088 17090 17091 17092 17094 17095 17096 17097 
##     1     1     1     1     1     1     1     1     1     3     1     1     1 
## 17100 17101 17102 17105 17107 17109 17110 17111 17114 17115 17117 17118 17119 
##     1     1     3     3     1     1     3     1     1     1     3     3     1 
## 17120 17122 17123 17124 17125 17126 17128 17131 17133 17134 17135 17138 17139 
##     3     1     3     3     1     3     3     1     1     1     1     3     1 
## 17140 17142 17144 17146 17147 17148 17152 17153 17154 17155 17157 17158 17159 
##     3     3     1     1     1     1     3     1     1     1     1     1     1 
## 17160 17162 17163 17164 17165 17166 17169 17171 17172 17173 17174 17175 17176 
##     1     1     1     1     3     1     1     3     1     1     3     1     3 
## 17179 17180 17181 17183 17186 17187 17188 17189 17190 17191 17193 17194 17197 
##     3     1     1     1     1     3     1     1     1     1     1     3     1 
## 17198 17201 17203 17204 17205 17206 17211 17212 17213 17214 17217 17218 17219 
##     1     1     1     3     1     1     1     3     1     1     3     1     1 
## 17220 17221 17222 17223 17226 17227 17228 17229 17230 17231 17232 17233 17234 
##     1     1     1     3     3     1     1     1     3     1     1     1     3 
## 17235 17236 17237 17238 17239 17242 17243 17244 17245 17247 17248 17250 17251 
##     1     1     1     1     3     1     1     1     3     1     1     1     3 
## 17252 17253 17254 17255 17256 17259 17262 17263 17265 17266 17267 17268 17272 
##     1     1     1     1     1     3     1     3     1     1     1     1     1 
## 17274 17277 17278 17279 17282 17284 17286 17287 17288 17289 17290 17291 17293 
##     1     3     3     1     1     1     1     1     1     1     1     3     1 
## 17295 17297 17298 17299 17301 17302 17303 17306 17309 17311 17312 17313 17314 
##     1     1     1     1     1     1     3     1     1     1     1     1     1 
## 17315 17317 17320 17321 17323 17324 17325 17329 17330 17331 17333 17334 17337 
##     1     1     1     1     1     1     3     1     1     1     1     3     3 
## 17338 17339 17340 17341 17343 17344 17345 17346 17347 17348 17349 17350 17351 
##     1     1     1     3     3     1     1     1     1     1     3     1     1 
## 17353 17354 17356 17357 17358 17359 17360 17361 17362 17364 17365 17367 17368 
##     1     1     3     1     3     1     1     1     3     1     1     3     1 
## 17370 17371 17372 17373 17374 17375 17376 17377 17379 17381 17382 17383 17384 
##     1     1     1     1     3     3     1     1     1     1     1     1     1 
## 17385 17386 17387 17388 17389 17391 17392 17394 17396 17397 17398 17400 17402 
##     1     1     1     1     1     3     3     3     1     1     1     1     1 
## 17403 17404 17405 17406 17408 17409 17410 17411 17412 17414 17415 17416 17418 
##     1     1     1     3     3     3     1     1     1     1     1     1     1 
## 17419 17420 17422 17423 17425 17426 17427 17428 17429 17430 17431 17432 17433 
##     1     1     1     1     1     1     1     1     1     1     3     1     1 
## 17434 17436 17438 17440 17442 17446 17447 17449 17450 17451 17453 17454 17455 
##     1     1     3     3     1     3     1     1     2     1     1     3     3 
## 17456 17457 17458 17459 17460 17461 17462 17463 17464 17466 17468 17469 17470 
##     3     1     1     1     1     1     1     1     3     1     1     1     1 
## 17472 17475 17480 17481 17483 17486 17489 17490 17491 17492 17495 17496 17498 
##     3     1     1     1     1     3     1     1     1     3     1     3     1 
## 17499 17500 17501 17502 17503 17504 17505 17506 17507 17508 17509 17510 17511 
##     3     1     3     1     1     3     3     1     3     3     1     1     2 
## 17512 17513 17514 17515 17516 17517 17519 17520 17521 17522 17523 17524 17525 
##     1     1     1     1     1     3     1     1     1     1     1     3     3 
## 17526 17527 17528 17530 17531 17534 17535 17536 17537 17538 17540 17542 17545 
##     1     1     1     1     3     1     3     3     1     1     1     3     1 
## 17548 17549 17550 17551 17552 17553 17554 17555 17556 17557 17560 17561 17562 
##     3     1     3     3     1     1     1     1     3     1     1     1     1 
## 17564 17566 17567 17569 17571 17572 17573 17574 17576 17578 17579 17580 17581 
##     1     1     1     3     1     1     1     3     1     3     1     3     1 
## 17582 17584 17585 17588 17589 17590 17591 17593 17594 17595 17596 17597 17600 
##     3     1     1     1     1     1     1     1     1     1     1     3     1 
## 17601 17602 17603 17604 17608 17609 17611 17612 17613 17614 17615 17616 17618 
##     3     1     1     3     1     1     1     1     1     1     1     3     1 
## 17619 17620 17621 17623 17624 17625 17628 17629 17630 17631 17633 17634 17636 
##     3     1     1     1     1     1     1     1     3     1     1     1     1 
## 17637 17639 17640 17642 17643 17644 17646 17647 17648 17649 17650 17651 17652 
##     1     3     1     1     3     1     3     1     1     3     1     1     1 
## 17653 17654 17655 17656 17658 17659 17660 17663 17664 17666 17667 17668 17669 
##     1     3     1     1     1     1     3     1     1     1     1     1     1 
## 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17682 17684 
##     3     1     1     1     1     1     1     1     3     1     1     1     1 
## 17685 17686 17690 17691 17692 17693 17694 17695 17696 17697 17698 17700 17701 
##     1     1     1     3     1     3     3     1     1     3     3     1     3 
## 17702 17703 17704 17705 17706 17707 17708 17709 17711 17712 17714 17715 17716 
##     1     1     3     1     1     3     3     3     1     1     3     3     1 
## 17718 17719 17720 17722 17723 17724 17725 17727 17728 17730 17731 17732 17733 
##     3     1     1     1     1     1     1     1     1     1     1     3     1 
## 17734 17735 17736 17737 17738 17739 17742 17744 17746 17747 17749 17750 17752 
##     1     1     1     1     1     1     1     1     3     1     3     1     3 
## 17754 17757 17758 17759 17760 17761 17763 17764 17765 17767 17768 17769 17770 
##     1     1     1     1     1     1     3     1     3     1     1     1     3 
## 17771 17772 17774 17775 17777 17779 17781 17783 17785 17786 17787 17788 17789 
##     1     1     1     3     1     1     3     1     1     1     3     1     3 
## 17790 17791 17793 17795 17796 17797 17799 17800 17802 17805 17806 17809 17811 
##     1     1     1     3     1     1     1     1     1     1     1     1     1 
## 17812 17813 17816 17817 17819 17824 17827 17828 17829 17830 17831 17832 17835 
##     1     1     1     1     1     1     1     1     3     1     1     1     1 
## 17836 17837 17838 17839 17841 17843 17846 17848 17849 17850 17852 17854 17855 
##     1     1     1     1     2     3     1     1     3     3     1     3     3 
## 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17869 
##     1     1     1     3     3     1     3     1     1     1     3     1     1 
## 17870 17871 17873 17874 17877 17878 17879 17880 17881 17883 17884 17885 17886 
##     1     3     1     3     3     1     3     3     3     1     1     1     1 
## 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 
##     1     1     3     3     3     1     3     1     1     1     3     1     3 
## 17900 17901 17904 17905 17906 17908 17911 17912 17913 17914 17917 17919 17920 
##     3     1     1     1     3     3     1     3     1     1     1     1     1 
## 17921 17923 17924 17925 17926 17928 17929 17930 17931 17932 17934 17935 17936 
##     1     3     1     3     1     1     1     1     1     1     1     1     1 
## 17937 17939 17940 17941 17942 17946 17947 17948 17949 17950 17951 17954 17955 
##     1     3     1     1     1     3     1     3     2     1     1     1     3 
## 17956 17957 17958 17960 17961 17962 17964 17965 17966 17967 17968 17969 17970 
##     3     1     1     3     1     3     1     1     1     3     3     3     3 
## 17972 17973 17974 17975 17976 17977 17978 17979 17980 17984 17985 17986 17987 
##     3     1     1     1     3     1     3     1     3     3     1     1     3 
## 17988 17990 17991 17994 17995 17997 17999 18001 18004 18005 18006 18008 18009 
##     1     3     3     1     3     1     1     1     3     1     1     1     3 
## 18010 18011 18013 18014 18015 18016 18017 18018 18019 18022 18024 18027 18030 
##     3     3     3     1     1     1     1     1     1     1     3     1     1 
## 18032 18033 18034 18035 18036 18037 18040 18041 18042 18043 18044 18045 18048 
##     3     1     1     1     1     3     1     1     1     1     1     1     3 
## 18050 18053 18055 18056 18058 18059 18061 18062 18064 18065 18066 18067 18068 
##     3     1     1     3     1     1     1     3     1     1     1     1     3 
## 18069 18071 18072 18073 18074 18075 18077 18078 18079 18080 18081 18082 18084 
##     1     3     3     1     3     1     1     3     1     1     1     1     1 
## 18085 18086 18087 18088 18092 18093 18094 18095 18096 18097 18099 18101 18102 
##     3     3     1     1     1     1     1     3     1     1     1     1     2 
## 18104 18105 18106 18108 18109 18110 18112 18113 18114 18116 18117 18118 18119 
##     1     1     3     3     1     1     1     3     3     1     1     1     3 
## 18120 18121 18122 18123 18125 18126 18127 18129 18130 18133 18135 18136 18138 
##     3     3     1     1     1     1     1     3     1     3     1     1     3 
## 18139 18142 18143 18144 18145 18146 18147 18149 18150 18151 18154 18155 18156 
##     1     3     1     1     1     3     1     1     1     1     1     1     1 
## 18158 18159 18160 18161 18164 18165 18167 18168 18169 18170 18171 18172 18173 
##     1     3     1     1     1     3     1     3     1     1     1     1     1 
## 18174 18176 18177 18178 18179 18180 18181 18183 18184 18185 18188 18189 18190 
##     1     3     1     1     1     1     1     3     1     3     1     1     3 
## 18191 18192 18193 18194 18196 18198 18200 18202 18203 18204 18205 18209 18210 
##     3     1     3     1     1     1     1     3     3     1     1     1     1 
## 18211 18212 18213 18215 18216 18217 18218 18219 18220 18221 18222 18223 18224 
##     1     3     3     1     1     1     3     1     3     1     1     1     3 
## 18225 18226 18227 18228 18229 18230 18231 18232 18233 18235 18236 18237 18239 
##     1     1     3     1     1     1     3     1     3     1     1     1     3 
## 18240 18241 18242 18245 18246 18248 18249 18250 18251 18252 18255 18257 18259 
##     1     1     1     1     1     1     1     3     1     1     1     1     1 
## 18260 18261 18262 18263 18265 18268 18269 18270 18272 18273 18274 18276 18277 
##     3     1     3     1     1     1     3     1     1     1     1     1     1 
## 18278 18280 18281 18282 18283 18287 
##     1     3     3     1     1     1 
## 
## Within cluster sum of squares by cluster:
## [1] 2498.3071 2542.4354  587.1756
##  (between_SS / total_SS =  56.3 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"

Optimizar número de grupos

set.seed(123)
optimizacion3 <- clusGap(df3_escalados, FUN = kmeans, nstart = 25, K.max = 10)
plot(optimizacion3, xlab = "Número de clusters K", main = "Optimización de Clusters - Clientes") 

Graficar los grupos

fviz_cluster(clusters3, data = df3_escalados) 

Agregar grupos a la base de datos

df3_escalados <- cbind(df3_escalados, cluster = clusters3$cluster)
head(df3_escalados)
##         Recencia Frecuencia       Monto cluster
## 12346  2.3249311 -0.4556335  8.75412928       2
## 12347 -0.9001944  0.3915431  0.26969044       1
## 12349 -0.7404358 -0.4556335 -0.02748311       1
## 12350  2.1751575 -0.4556335 -0.19317588       3
## 12352 -0.5607075  0.5327392  0.05966118       1
## 12353  1.1167572 -0.4556335 -0.22174702       3

Análisis de promedios por cluster para perfilamiento

df3_escalados <- cbind(df3_rfm, cluster = clusters3$cluster)

resumen_clusters <- df3_escalados %>%
  group_by(cluster) %>%
  summarise(
    Num_Clientes = n(),
    Recencia_Prom = mean(Recencia),
    Frecuencia_Prom = mean(Frecuencia),
    Monto_Prom = mean(Monto)
  )

print(resumen_clusters)
## # A tibble: 3 × 5
##   cluster Num_Clientes Recencia_Prom Frecuencia_Prom Monto_Prom
##     <int>        <int>         <dbl>           <dbl>      <dbl>
## 1       1         3189          41.6            4.70      1856.
## 2       2           25          19.3           58.9      81980.
## 3       3         1082         247.             1.58       552.

Asignación de nombres descriptivos según el perfil de cada segmento

df3_escalados <- df3_escalados %>%
  mutate(Perfil = case_when(
    cluster == 1 ~ "Clientes Leales VIP",        # Baja recencia, alta frecuencia/monto
    cluster == 2 ~ "Clientes Ocasionales",       # Alta recencia, baja frecuencia/monto
    cluster == 3 ~ "Clientes Nuevos / Prometedores", # Baja recencia, baja frecuencia
    cluster == 4 ~ "Clientes en Riesgo / Inactivos"  # Muy alta recencia
  ))

head(df3_escalados) 
##       Recencia Frecuencia    Monto cluster                         Perfil
## 12346      326          1 77183.60       2           Clientes Ocasionales
## 12347        3          7  4310.00       1            Clientes Leales VIP
## 12349       19          1  1757.55       1            Clientes Leales VIP
## 12350      311          1   334.40       3 Clientes Nuevos / Prometedores
## 12352       37          8  2506.04       1            Clientes Leales VIP
## 12353      205          1    89.00       3 Clientes Nuevos / Prometedores
LS0tCnRpdGxlOiAiQ2x1c3RlcnMgLSBQdW50b3MsIFVTQXJyZXN0cyB5IENsaWVudGVzIgphdXRob3I6ICJEYW5hcmEgRXNwYXJ6YSBBMDA4NDA2MDIiCmRhdGU6ICJgciBTeXMuRGF0ZSgpYCIKb3V0cHV0OiAKICBodG1sX2RvY3VtZW50OgogICAgdG9jOiBUUlVFCiAgICB0b2NfZmxvYXQ6IFRSVUUKICAgIGNvZGVfZG93bmxvYWQ6IFRSVUUKICAgIHRoZW1lOiBkYXJrbHkKLS0tCgohW10oaHR0cHM6Ly93d3cuc2h1dHRlcnN0b2NrLmNvbS9pbWFnZS1waG90by9jbHVzdGVyLWFuYWx5c2lzLW1hcmtldGluZy1zdGF0aXN0aWNhbC1kYXRhLTI2MG53LTI2ODQzMTg5NTkuanBnKSAKCiMgPHNwYW4gc3R5bGU9ICJjb2xvcjogeWVsbG93Ij4gVGVvcsOtYSA8L3NwYW4+IAoqKkFncnVwYW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