Lotto Number Recommend with Association Rules Using R
The number of lotto Recommend Systems with R & Analytics
- 1 ~ 730회차 Lotto Numbers
- Association Rules
Load Library & Data
library(arules)
library(reshape2)
lotte <- read.csv("lotto.csv")
lotte <- lotte[,-8]
colnames(lotte) <- c("seq","N1","N2","N3","N4","N5","N6")
회차 별 뽑힌 숫자.
- 보너스 숫자 제외
print(head(lotte[order(lotte$seq, decreasing = F),]))
seq N1 N2 N3 N4 N5 N6
730 1 10 23 29 33 37 40
729 2 9 13 21 25 32 42
728 3 11 16 19 21 27 31
727 4 14 27 30 31 40 42
726 5 16 24 29 40 41 42
725 6 14 15 26 27 40 42
Data Reshaping
- \(Transacition\ Data\) 형성을 위해 \(Reshape\) (\(Melt\)를 \(seq\)를 기준으로 수행)
melt_lotte <- melt(lotte, id="seq") # seq(회차)를 기준으로 데이터 Melt
print(melt_lotte[melt_lotte$seq ==730,]) # 확인
seq variable value
1 730 N1 4
731 730 N2 10
1461 730 N3 14
2191 730 N4 15
2921 730 N5 18
3651 730 N6 22
Pick data from DF
data <- melt_lotte[,c(1,3)] # seq, value
print(head(data[order(data$seq,decreasing = T),]))
seq value
1 730 4
731 730 10
1461 730 14
2191 730 15
2921 730 18
3651 730 22
Split Data with seq number
- \(Value\)를 \(Seq\)로 \(Split\)한다.
print(head(split(data$value, data$seq)))
$`1`
[1] 10 23 29 33 37 40
$`2`
[1] 9 13 21 25 32 42
$`3`
[1] 11 16 19 21 27 31
$`4`
[1] 14 27 30 31 40 42
$`5`
[1] 16 24 29 40 41 42
$`6`
[1] 14 15 26 27 40 42
Make Transactions
trans <- as(split(data$value, data$seq), "transactions") #transactions 메소드
trans
transactions in sparse format with
730 transactions (rows) and
45 items (columns)
Inspect a transaction
- 각 회차별 나온 숫자를 Transaction으로 변형
print(inspect(trans[1:10]))
items transactionID
[1] {10,23,29,33,37,40} 1
[2] {9,13,21,25,32,42} 2
[3] {11,16,19,21,27,31} 3
[4] {14,27,30,31,40,42} 4
[5] {16,24,29,40,41,42} 5
[6] {14,15,26,27,40,42} 6
[7] {2,9,16,25,26,40} 7
[8] {8,19,25,34,37,39} 8
[9] {2,4,16,17,36,39} 9
[10] {9,25,30,33,41,44} 10
items transactionID
[1] {10,23,29,33,37,40} 1
[2] {9,13,21,25,32,42} 2
[3] {11,16,19,21,27,31} 3
[4] {14,27,30,31,40,42} 4
[5] {16,24,29,40,41,42} 5
[6] {14,15,26,27,40,42} 6
[7] {2,9,16,25,26,40} 7
[8] {8,19,25,34,37,39} 8
[9] {2,4,16,17,36,39} 9
[10] {9,25,30,33,41,44} 10
Image of Transaction
- 1 ~ 45 까지 숫자 중 각 회차별 새당 되는 숫자에 색이 칠해진다.
options(repr.plot.width=4,repr.plot.height=2)
image(trans[1:10])
Check Frequency of items
- 각 회차에 나온 개별의 숫자들의 빈발 정도를 확인 (absolute : Counts of values)
print(t(itemFrequency(trans, type="absolute")))
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
[1,] 109 95 96 105 102 91 100 104 72 99 101 94 101 105 99 89 105 100 98 116 90
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
[1,] 82 90 95 99 100 111 85 91 87 98 85 101 113 92 96 108 91 99 114 86 87 101
44 45
[1,] 100 98
Check Posibility of items
- 각 회차에 나온 개별 숫자들의 나온 확률을 확인
print(t(round(itemFrequency(trans)[order(itemFrequency(trans), decreasing = TRUE)],2)))
20 40 34 27 1 37 4 14 17 8 5 11 13 33 43
[1,] 0.16 0.16 0.15 0.15 0.15 0.15 0.14 0.14 0.14 0.14 0.14 0.14 0.14 0.14 0.14
7 18 26 44 10 15 25 39 19 31 45 3 36 2 24
[1,] 0.14 0.14 0.14 0.14 0.14 0.14 0.14 0.14 0.13 0.13 0.13 0.13 0.13 0.13 0.13
12 35 6 29 38 21 23 16 30 42 41 28 32 22 9
[1,] 0.13 0.13 0.12 0.12 0.12 0.12 0.12 0.12 0.12 0.12 0.12 0.12 0.12 0.11 0.1
Plotting items with support
- 상위 20개 지지도를 가진 Items를 Plotting
options(repr.plot.width=4,repr.plot.height=4)
itemFrequencyPlot(trans, topN = 20, main = "support top 20 items",cex.names=0.6)
Making rules with transaction data, Lotte
- 최소 지지도를 넘는 빈발 집합을 출력.
- Transaction ID 는 필요 없으므로 제외
rules <- apriori(trans[,-2],parameter = list(support=0.005,target="frequent itemsets"))
Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen
NA 0.1 1 none FALSE TRUE 5 0.005 1
maxlen target ext
10 frequent itemsets FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 3
set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[44 item(s), 730 transaction(s)] done [0.00s].
sorting and recoding items ... [44 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 2 3 done [0.00s].
writing ... [1241 set(s)] done [0.00s].
creating S4 object ... done [0.00s].
- 크기 1 : 44개
- 크기 2 : 941개
- 크기 3 : 256개
summary of quality measures
- 최소 지지도 : 0.0055
- 최대 지지도 : 0.1589
summary(rules)
set of 1241 itemsets
most frequent items:
40 20 27 7 35 (Other)
76 74 70 68 68 2338
element (itemset/transaction) length distribution:sizes
1 2 3
44 941 256
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.000 2.000 2.000 2.171 2.000 3.000
summary of quality measures:
support
Min. :0.005479
1st Qu.:0.008219
Median :0.013699
Mean :0.017469
3rd Qu.:0.017808
Max. :0.158904
includes transaction ID lists: FALSE
mining info:
data ntransactions support confidence
trans[, -2] 730 0.005 1
inspect(rules[1:10])
items support
[1] {9} 0.09863014
[2] {22} 0.11232877
[3] {28} 0.11643836
[4] {32} 0.11643836
[5] {41} 0.11780822
[6] {42} 0.11917808
[7] {30} 0.11917808
[8] {16} 0.12191781
[9] {21} 0.12328767
[10] {23} 0.12328767
Top 10 of the Support
inspect(sort(rules, by = "support")[1:10])
items support
[1] {20} 0.1589041
[2] {40} 0.1561644
[3] {34} 0.1547945
[4] {27} 0.1520548
[5] {1} 0.1493151
[6] {37} 0.1479452
[7] {17} 0.1438356
[8] {4} 0.1438356
[9] {14} 0.1438356
[10] {8} 0.1424658
2 Set of Rules
inspect(sort(rules, by = "support")[43:50])
items support
[1] {22} 0.11232877
[2] {9} 0.09863014
[3] {20,35} 0.02876712
[4] {3,20} 0.02876712
[5] {31,34} 0.02876712
[6] {8,39} 0.02876712
[7] {33,40} 0.02876712
[8] {27,40} 0.02876712
Find 3 Set of Rules
- {19,25,28} 0.006849315 is Maximum support 3 Set
inspect(sort(rules[rules@quality$support >= 0.005 & rules@quality$support <= 0.00685], by = "support")[25:40])
items support
[1] {24,43} 0.006849315
[2] {31,39} 0.006849315
[3] {19,25,28} 0.006849315
[4] {15,28,34} 0.006849315
[5] {4,28,40} 0.006849315
[6] {10,16,41} 0.006849315
[7] {34,42,45} 0.006849315
[8] {5,18,42} 0.006849315
[9] {14,27,30} 0.006849315
[10] {11,14,21} 0.006849315
[11] {23,29,44} 0.006849315
[12] {23,35,43} 0.006849315
[13] {6,7,15} 0.006849315
[14] {6,18,31} 0.006849315
[15] {11,29,44} 0.006849315
[16] {27,29,40} 0.006849315
df <- as.data.frame(inspect(sort(rules, by = "support")))
items support
[1] {20} 0.158904110
[2] {40} 0.156164384
[3] {34} 0.154794521
[4] {27} 0.152054795
[5] {1} 0.149315068
[6] {37} 0.147945205
[7] {17} 0.143835616
[8] {4} 0.143835616
[9] {14} 0.143835616
[10] {8} 0.142465753
[11] {5} 0.139726027
[12] {33} 0.138356164
[13] {11} 0.138356164
[14] {43} 0.138356164
[15] {13} 0.138356164
[16] {44} 0.136986301
[17] {7} 0.136986301
[18] {18} 0.136986301
[19] {26} 0.136986301
[20] {25} 0.135616438
[21] {15} 0.135616438
[22] {39} 0.135616438
[23] {10} 0.135616438
[24] {19} 0.134246575
[25] {45} 0.134246575
[26] {31} 0.134246575
[27] {3} 0.131506849
[28] {36} 0.131506849
[29] {24} 0.130136986
[30] {12} 0.128767123
[31] {35} 0.126027397
[32] {6} 0.124657534
[33] {38} 0.124657534
[34] {29} 0.124657534
[35] {21} 0.123287671
[36] {23} 0.123287671
[37] {16} 0.121917808
[38] {42} 0.119178082
[39] {30} 0.119178082
[40] {41} 0.117808219
[41] {28} 0.116438356
[42] {32} 0.116438356
[43] {22} 0.112328767
[44] {9} 0.098630137
[45] {20,35} 0.028767123
[46] {3,20} 0.028767123
[47] {31,34} 0.028767123
[48] {8,39} 0.028767123
[49] {33,40} 0.028767123
[50] {27,40} 0.028767123
[51] {11,21} 0.027397260
[52] {7,20} 0.027397260
[53] {11,26} 0.027397260
[54] {22,37} 0.026027397
[55] {17,31} 0.026027397
[56] {31,40} 0.026027397
[57] {7,18} 0.026027397
[58] {7,40} 0.026027397
[59] {5,20} 0.026027397
[60] {8,27} 0.026027397
[61] {4,20} 0.026027397
[62] {1,34} 0.026027397
[63] {1,28} 0.024657534
[64] {1,42} 0.024657534
[65] {27,35} 0.024657534
[66] {12,24} 0.024657534
[67] {12,15} 0.024657534
[68] {24,27} 0.024657534
[69] {14,15} 0.024657534
[70] {10,31} 0.024657534
[71] {14,39} 0.024657534
[72] {20,33} 0.024657534
[73] {5,34} 0.024657534
[74] {17,20} 0.024657534
[75] {4,40} 0.024657534
[76] {37,40} 0.024657534
[77] {6,28} 0.023287671
[78] {16,41} 0.023287671
[79] {14,21} 0.023287671
[80] {18,23} 0.023287671
[81] {29,44} 0.023287671
[82] {35,40} 0.023287671
[83] {3,24} 0.023287671
[84] {19,25} 0.023287671
[85] {19,43} 0.023287671
[86] {17,45} 0.023287671
[87] {15,34} 0.023287671
[88] {18,31} 0.023287671
[89] {11,39} 0.023287671
[90] {34,44} 0.023287671
[91] {4,10} 0.023287671
[92] {26,43} 0.023287671
[93] {26,27} 0.023287671
[94] {13,33} 0.023287671
[95] {4,33} 0.023287671
[96] {11,37} 0.023287671
[97] {37,43} 0.023287671
[98] {5,14} 0.023287671
[99] {5,27} 0.023287671
[100] {1,8} 0.023287671
[101] {1,17} 0.023287671
[102] {4,34} 0.023287671
[103] {1,20} 0.023287671
[104] {28,40} 0.021917808
[105] {3,32} 0.021917808
[106] {14,32} 0.021917808
[107] {33,41} 0.021917808
[108] {30,45} 0.021917808
[109] {14,30} 0.021917808
[110] {20,23} 0.021917808
[111] {29,33} 0.021917808
[112] {1,3} 0.021917808
[113] {3,27} 0.021917808
[114] {25,36} 0.021917808
[115] {36,39} 0.021917808
[116] {17,36} 0.021917808
[117] {10,19} 0.021917808
[118] {19,34} 0.021917808
[119] {37,45} 0.021917808
[120] {7,15} 0.021917808
[121] {10,44} 0.021917808
[122] {1,10} 0.021917808
[123] {10,40} 0.021917808
[124] {18,26} 0.021917808
[125] {8,18} 0.021917808
[126] {4,26} 0.021917808
[127] {8,13} 0.021917808
[128] {13,37} 0.021917808
[129] {1,40} 0.021917808
[130] {11,28} 0.020547945
[131] {12,32} 0.020547945
[132] {18,32} 0.020547945
[133] {41,45} 0.020547945
[134] {40,41} 0.020547945
[135] {19,42} 0.020547945
[136] {30,38} 0.020547945
[137] {16,29} 0.020547945
[138] {23,44} 0.020547945
[139] {6,38} 0.020547945
[140] {6,13} 0.020547945
[141] {5,6} 0.020547945
[142] {6,40} 0.020547945
[143] {8,38} 0.020547945
[144] {37,38} 0.020547945
[145] {38,40} 0.020547945
[146] {29,43} 0.020547945
[147] {1,29} 0.020547945
[148] {35,43} 0.020547945
[149] {12,40} 0.020547945
[150] {24,44} 0.020547945
[151] {20,24} 0.020547945
[152] {3,11} 0.020547945
[153] {3,14} 0.020547945
[154] {3,37} 0.020547945
[155] {4,19} 0.020547945
[156] {19,20} 0.020547945
[157] {18,45} 0.020547945
[158] {8,45} 0.020547945
[159] {34,45} 0.020547945
[160] {4,25} 0.020547945
[161] {15,26} 0.020547945
[162] {11,15} 0.020547945
[163] {31,44} 0.020547945
[164] {14,31} 0.020547945
[165] {27,31} 0.020547945
[166] {17,39} 0.020547945
[167] {11,44} 0.020547945
[168] {20,44} 0.020547945
[169] {7,33} 0.020547945
[170] {1,18} 0.020547945
[171] {18,34} 0.020547945
[172] {14,26} 0.020547945
[173] {26,40} 0.020547945
[174] {20,26} 0.020547945
[175] {33,37} 0.020547945
[176] {11,13} 0.020547945
[177] {5,11} 0.020547945
[178] {27,43} 0.020547945
[179] {13,20} 0.020547945
[180] {1,5} 0.020547945
[181] {4,27} 0.020547945
[182] {1,37} 0.020547945
[183] {19,28} 0.019178082
[184] {13,28} 0.019178082
[185] {39,41} 0.019178082
[186] {41,44} 0.019178082
[187] {15,42} 0.019178082
[188] {5,42} 0.019178082
[189] {27,42} 0.019178082
[190] {24,30} 0.019178082
[191] {30,43} 0.019178082
[192] {8,30} 0.019178082
[193] {17,30} 0.019178082
[194] {30,34} 0.019178082
[195] {20,30} 0.019178082
[196] {10,16} 0.019178082
[197] {4,16} 0.019178082
[198] {16,40} 0.019178082
[199] {18,21} 0.019178082
[200] {21,26} 0.019178082
[201] {8,21} 0.019178082
[202] {21,34} 0.019178082
[203] {23,35} 0.019178082
[204] {4,23} 0.019178082
[205] {6,31} 0.019178082
[206] {26,29} 0.019178082
[207] {27,29} 0.019178082
[208] {33,35} 0.019178082
[209] {17,35} 0.019178082
[210] {35,37} 0.019178082
[211] {12,27} 0.019178082
[212] {12,34} 0.019178082
[213] {12,20} 0.019178082
[214] {24,33} 0.019178082
[215] {3,13} 0.019178082
[216] {36,44} 0.019178082
[217] {33,36} 0.019178082
[218] {8,36} 0.019178082
[219] {14,36} 0.019178082
[220] {20,36} 0.019178082
[221] {19,45} 0.019178082
[222] {14,45} 0.019178082
[223] {15,25} 0.019178082
[224] {25,33} 0.019178082
[225] {5,25} 0.019178082
[226] {25,37} 0.019178082
[227] {25,34} 0.019178082
[228] {15,43} 0.019178082
[229] {15,20} 0.019178082
[230] {8,31} 0.019178082
[231] {7,39} 0.019178082
[232] {18,39} 0.019178082
[233] {27,39} 0.019178082
[234] {8,44} 0.019178082
[235] {17,44} 0.019178082
[236] {10,37} 0.019178082
[237] {7,43} 0.019178082
[238] {7,37} 0.019178082
[239] {8,33} 0.019178082
[240] {11,14} 0.019178082
[241] {8,43} 0.019178082
[242] {20,43} 0.019178082
[243] {5,13} 0.019178082
[244] {13,14} 0.019178082
[245] {4,5} 0.019178082
[246] {8,17} 0.019178082
[247] {8,34} 0.019178082
[248] {17,34} 0.019178082
[249] {4,37} 0.019178082
[250] {14,40} 0.019178082
[251] {1,27} 0.019178082
[252] {20,40} 0.019178082
[253] {5,9} 0.017808219
[254] {22,36} 0.017808219
[255] {22,25} 0.017808219
[256] {10,22} 0.017808219
[257] {14,22} 0.017808219
[258] {22,34} 0.017808219
[259] {28,34} 0.017808219
[260] {32,45} 0.017808219
[261] {10,32} 0.017808219
[262] {32,33} 0.017808219
[263] {11,32} 0.017808219
[264] {13,32} 0.017808219
[265] {17,32} 0.017808219
[266] {32,40} 0.017808219
[267] {7,41} 0.017808219
[268] {4,41} 0.017808219
[269] {3,42} 0.017808219
[270] {42,45} 0.017808219
[271] {7,42} 0.017808219
[272] {34,42} 0.017808219
[273] {27,30} 0.017808219
[274] {16,36} 0.017808219
[275] {16,25} 0.017808219
[276] {7,16} 0.017808219
[277] {16,26} 0.017808219
[278] {16,17} 0.017808219
[279] {1,16} 0.017808219
[280] {21,36} 0.017808219
[281] {15,21} 0.017808219
[282] {21,31} 0.017808219
[283] {23,29} 0.017808219
[284] {15,23} 0.017808219
[285] {6,39} 0.017808219
[286] {6,10} 0.017808219
[287] {6,37} 0.017808219
[288] {12,38} 0.017808219
[289] {7,38} 0.017808219
[290] {25,29} 0.017808219
[291] {7,29} 0.017808219
[292] {26,35} 0.017808219
[293] {1,35} 0.017808219
[294] {1,12} 0.017808219
[295] {10,24} 0.017808219
[296] {7,24} 0.017808219
[297] {24,40} 0.017808219
[298] {3,7} 0.017808219
[299] {3,4} 0.017808219
[300] {36,45} 0.017808219
[301] {11,36} 0.017808219
[302] {34,36} 0.017808219
[303] {19,26} 0.017808219
[304] {5,19} 0.017808219
[305] {17,19} 0.017808219
[306] {39,45} 0.017808219
[307] {25,43} 0.017808219
[308] {13,25} 0.017808219
[309] {13,15} 0.017808219
[310] {11,31} 0.017808219
[311] {31,37} 0.017808219
[312] {39,44} 0.017808219
[313] {5,39} 0.017808219
[314] {26,44} 0.017808219
[315] {10,18} 0.017808219
[316] {10,14} 0.017808219
[317] {7,8} 0.017808219
[318] {11,18} 0.017808219
[319] {13,18} 0.017808219
[320] {14,18} 0.017808219
[321] {1,26} 0.017808219
[322] {26,37} 0.017808219
[323] {17,33} 0.017808219
[324] {14,33} 0.017808219
[325] {4,11} 0.017808219
[326] {1,11} 0.017808219
[327] {13,43} 0.017808219
[328] {13,34} 0.017808219
[329] {13,40} 0.017808219
[330] {8,14} 0.017808219
[331] {4,17} 0.017808219
[332] {17,40} 0.017808219
[333] {14,37} 0.017808219
[334] {14,27} 0.017808219
[335] {14,20} 0.017808219
[336] {27,37} 0.017808219
[337] {27,34} 0.017808219
[338] {20,27} 0.017808219
[339] {9,25} 0.016438356
[340] {4,9} 0.016438356
[341] {6,22} 0.016438356
[342] {15,22} 0.016438356
[343] {5,22} 0.016438356
[344] {22,40} 0.016438356
[345] {28,43} 0.016438356
[346] {17,28} 0.016438356
[347] {29,32} 0.016438356
[348] {24,32} 0.016438356
[349] {32,34} 0.016438356
[350] {36,41} 0.016438356
[351] {13,41} 0.016438356
[352] {1,41} 0.016438356
[353] {20,41} 0.016438356
[354] {30,39} 0.016438356
[355] {18,30} 0.016438356
[356] {30,37} 0.016438356
[357] {16,23} 0.016438356
[358] {16,43} 0.016438356
[359] {16,34} 0.016438356
[360] {19,21} 0.016438356
[361] {21,39} 0.016438356
[362] {21,43} 0.016438356
[363] {1,21} 0.016438356
[364] {23,45} 0.016438356
[365] {23,25} 0.016438356
[366] {23,43} 0.016438356
[367] {8,23} 0.016438356
[368] {23,34} 0.016438356
[369] {6,7} 0.016438356
[370] {6,17} 0.016438356
[371] {4,6} 0.016438356
[372] {6,14} 0.016438356
[373] {6,20} 0.016438356
[374] {24,38} 0.016438356
[375] {31,38} 0.016438356
[376] {18,38} 0.016438356
[377] {11,38} 0.016438356
[378] {13,38} 0.016438356
[379] {14,38} 0.016438356
[380] {12,29} 0.016438356
[381] {10,29} 0.016438356
[382] {5,29} 0.016438356
[383] {8,29} 0.016438356
[384] {29,40} 0.016438356
[385] {35,45} 0.016438356
[386] {35,44} 0.016438356
[387] {14,35} 0.016438356
[388] {12,44} 0.016438356
[389] {12,33} 0.016438356
[390] {12,43} 0.016438356
[391] {11,24} 0.016438356
[392] {1,24} 0.016438356
[393] {3,31} 0.016438356
[394] {3,44} 0.016438356
[395] {3,10} 0.016438356
[396] {3,8} 0.016438356
[397] {3,17} 0.016438356
[398] {7,36} 0.016438356
[399] {26,36} 0.016438356
[400] {36,37} 0.016438356
[401] {27,36} 0.016438356
[402] {15,19} 0.016438356
[403] {19,31} 0.016438356
[404] {7,19} 0.016438356
[405] {8,19} 0.016438356
[406] {14,19} 0.016438356
[407] {19,27} 0.016438356
[408] {43,45} 0.016438356
[409] {13,45} 0.016438356
[410] {25,39} 0.016438356
[411] {25,44} 0.016438356
[412] {8,25} 0.016438356
[413] {15,39} 0.016438356
[414] {15,44} 0.016438356
[415] {10,15} 0.016438356
[416] {15,37} 0.016438356
[417] {26,31} 0.016438356
[418] {31,43} 0.016438356
[419] {4,31} 0.016438356
[420] {39,43} 0.016438356
[421] {13,39} 0.016438356
[422] {37,39} 0.016438356
[423] {33,44} 0.016438356
[424] {5,44} 0.016438356
[425] {27,44} 0.016438356
[426] {10,33} 0.016438356
[427] {10,11} 0.016438356
[428] {10,27} 0.016438356
[429] {10,20} 0.016438356
[430] {7,27} 0.016438356
[431] {18,43} 0.016438356
[432] {5,18} 0.016438356
[433] {4,18} 0.016438356
[434] {18,37} 0.016438356
[435] {18,40} 0.016438356
[436] {13,26} 0.016438356
[437] {5,26} 0.016438356
[438] {27,33} 0.016438356
[439] {33,34} 0.016438356
[440] {14,43} 0.016438356
[441] {40,43} 0.016438356
[442] {13,17} 0.016438356
[443] {4,13} 0.016438356
[444] {1,13} 0.016438356
[445] {5,17} 0.016438356
[446] {4,8} 0.016438356
[447] {8,37} 0.016438356
[448] {17,37} 0.016438356
[449] {20,37} 0.016438356
[450] {34,40} 0.016438356
[451] {20,34} 0.016438356
[452] {9,21} 0.015068493
[453] {9,12} 0.015068493
[454] {9,33} 0.015068493
[455] {1,9} 0.015068493
[456] {9,27} 0.015068493
[457] {22,28} 0.015068493
[458] {22,42} 0.015068493
[459] {3,22} 0.015068493
[460] {22,44} 0.015068493
[461] {28,30} 0.015068493
[462] {28,39} 0.015068493
[463] {26,28} 0.015068493
[464] {28,37} 0.015068493
[465] {27,28} 0.015068493
[466] {6,32} 0.015068493
[467] {19,32} 0.015068493
[468] {31,32} 0.015068493
[469] {1,32} 0.015068493
[470] {32,37} 0.015068493
[471] {41,42} 0.015068493
[472] {3,41} 0.015068493
[473] {19,41} 0.015068493
[474] {10,41} 0.015068493
[475] {11,41} 0.015068493
[476] {34,41} 0.015068493
[477] {16,42} 0.015068493
[478] {23,42} 0.015068493
[479] {18,42} 0.015068493
[480] {8,42} 0.015068493
[481] {3,30} 0.015068493
[482] {6,16} 0.015068493
[483] {16,19} 0.015068493
[484] {16,31} 0.015068493
[485] {21,24} 0.015068493
[486] {21,45} 0.015068493
[487] {21,25} 0.015068493
[488] {13,21} 0.015068493
[489] {5,21} 0.015068493
[490] {4,21} 0.015068493
[491] {21,37} 0.015068493
[492] {23,38} 0.015068493
[493] {23,39} 0.015068493
[494] {11,23} 0.015068493
[495] {5,23} 0.015068493
[496] {1,23} 0.015068493
[497] {23,40} 0.015068493
[498] {6,24} 0.015068493
[499] {6,19} 0.015068493
[500] {6,44} 0.015068493
[501] {6,11} 0.015068493
[502] {29,38} 0.015068493
[503] {36,38} 0.015068493
[504] {19,38} 0.015068493
[505] {38,45} 0.015068493
[506] {25,38} 0.015068493
[507] {10,38} 0.015068493
[508] {34,38} 0.015068493
[509] {20,38} 0.015068493
[510] {29,34} 0.015068493
[511] {24,35} 0.015068493
[512] {19,35} 0.015068493
[513] {25,35} 0.015068493
[514] {15,35} 0.015068493
[515] {10,35} 0.015068493
[516] {8,35} 0.015068493
[517] {34,35} 0.015068493
[518] {3,12} 0.015068493
[519] {12,39} 0.015068493
[520] {7,12} 0.015068493
[521] {11,12} 0.015068493
[522] {12,14} 0.015068493
[523] {24,25} 0.015068493
[524] {15,24} 0.015068493
[525] {17,24} 0.015068493
[526] {24,37} 0.015068493
[527] {24,34} 0.015068493
[528] {3,45} 0.015068493
[529] {3,40} 0.015068493
[530] {10,36} 0.015068493
[531] {5,36} 0.015068493
[532] {19,44} 0.015068493
[533] {25,45} 0.015068493
[534] {11,45} 0.015068493
[535] {5,45} 0.015068493
[536] {4,45} 0.015068493
[537] {1,45} 0.015068493
[538] {27,45} 0.015068493
[539] {20,45} 0.015068493
[540] {14,25} 0.015068493
[541] {25,40} 0.015068493
[542] {20,25} 0.015068493
[543] {8,15} 0.015068493
[544] {15,40} 0.015068493
[545] {31,33} 0.015068493
[546] {33,39} 0.015068493
[547] {34,39} 0.015068493
[548] {39,40} 0.015068493
[549] {20,39} 0.015068493
[550] {14,44} 0.015068493
[551] {7,26} 0.015068493
[552] {17,18} 0.015068493
[553] {18,20} 0.015068493
[554] {17,26} 0.015068493
[555] {11,43} 0.015068493
[556] {11,17} 0.015068493
[557] {11,27} 0.015068493
[558] {5,43} 0.015068493
[559] {34,43} 0.015068493
[560] {1,4} 0.015068493
[561] {9,31} 0.013698630
[562] {9,10} 0.013698630
[563] {9,17} 0.013698630
[564] {22,38} 0.013698630
[565] {22,24} 0.013698630
[566] {19,22} 0.013698630
[567] {22,31} 0.013698630
[568] {7,22} 0.013698630
[569] {13,22} 0.013698630
[570] {22,27} 0.013698630
[571] {20,22} 0.013698630
[572] {28,36} 0.013698630
[573] {25,28} 0.013698630
[574] {15,28} 0.013698630
[575] {8,28} 0.013698630
[576] {4,28} 0.013698630
[577] {21,32} 0.013698630
[578] {5,32} 0.013698630
[579] {8,32} 0.013698630
[580] {4,32} 0.013698630
[581] {29,41} 0.013698630
[582] {12,41} 0.013698630
[583] {41,43} 0.013698630
[584] {27,41} 0.013698630
[585] {24,42} 0.013698630
[586] {26,42} 0.013698630
[587] {42,43} 0.013698630
[588] {13,42} 0.013698630
[589] {17,42} 0.013698630
[590] {4,42} 0.013698630
[591] {14,42} 0.013698630
[592] {40,42} 0.013698630
[593] {20,42} 0.013698630
[594] {16,30} 0.013698630
[595] {6,30} 0.013698630
[596] {30,36} 0.013698630
[597] {30,31} 0.013698630
[598] {30,33} 0.013698630
[599] {5,30} 0.013698630
[600] {16,24} 0.013698630
[601] {16,45} 0.013698630
[602] {16,44} 0.013698630
[603] {5,16} 0.013698630
[604] {16,37} 0.013698630
[605] {16,20} 0.013698630
[606] {21,23} 0.013698630
[607] {6,21} 0.013698630
[608] {21,29} 0.013698630
[609] {12,21} 0.013698630
[610] {21,27} 0.013698630
[611] {19,23} 0.013698630
[612] {10,23} 0.013698630
[613] {7,23} 0.013698630
[614] {23,26} 0.013698630
[615] {13,23} 0.013698630
[616] {14,23} 0.013698630
[617] {6,12} 0.013698630
[618] {6,25} 0.013698630
[619] {6,15} 0.013698630
[620] {6,18} 0.013698630
[621] {6,43} 0.013698630
[622] {1,6} 0.013698630
[623] {3,38} 0.013698630
[624] {38,39} 0.013698630
[625] {38,44} 0.013698630
[626] {38,43} 0.013698630
[627] {27,38} 0.013698630
[628] {29,35} 0.013698630
[629] {29,39} 0.013698630
[630] {18,29} 0.013698630
[631] {11,29} 0.013698630
[632] {13,29} 0.013698630
[633] {4,29} 0.013698630
[634] {29,37} 0.013698630
[635] {3,35} 0.013698630
[636] {35,39} 0.013698630
[637] {13,35} 0.013698630
[638] {5,35} 0.013698630
[639] {12,36} 0.013698630
[640] {12,19} 0.013698630
[641] {12,25} 0.013698630
[642] {12,26} 0.013698630
[643] {12,13} 0.013698630
[644] {5,12} 0.013698630
[645] {4,12} 0.013698630
[646] {24,45} 0.013698630
[647] {5,24} 0.013698630
[648] {3,36} 0.013698630
[649] {3,34} 0.013698630
[650] {15,36} 0.013698630
[651] {31,36} 0.013698630
[652] {18,36} 0.013698630
[653] {18,19} 0.013698630
[654] {1,19} 0.013698630
[655] {19,40} 0.013698630
[656] {15,45} 0.013698630
[657] {31,45} 0.013698630
[658] {40,45} 0.013698630
[659] {10,25} 0.013698630
[660] {7,25} 0.013698630
[661] {25,26} 0.013698630
[662] {1,25} 0.013698630
[663] {25,27} 0.013698630
[664] {5,15} 0.013698630
[665] {15,27} 0.013698630
[666] {20,31} 0.013698630
[667] {26,39} 0.013698630
[668] {4,39} 0.013698630
[669] {43,44} 0.013698630
[670] {40,44} 0.013698630
[671] {7,10} 0.013698630
[672] {10,34} 0.013698630
[673] {5,7} 0.013698630
[674] {7,17} 0.013698630
[675] {1,7} 0.013698630
[676] {18,33} 0.013698630
[677] {26,33} 0.013698630
[678] {26,34} 0.013698630
[679] {1,33} 0.013698630
[680] {8,11} 0.013698630
[681] {17,43} 0.013698630
[682] {4,43} 0.013698630
[683] {13,27} 0.013698630
[684] {5,8} 0.013698630
[685] {5,37} 0.013698630
[686] {14,17} 0.013698630
[687] {17,27} 0.013698630
[688] {4,14} 0.013698630
[689] {9,32} 0.012328767
[690] {9,41} 0.012328767
[691] {9,16} 0.012328767
[692] {6,9} 0.012328767
[693] {9,29} 0.012328767
[694] {7,9} 0.012328767
[695] {9,34} 0.012328767
[696] {9,40} 0.012328767
[697] {22,33} 0.012328767
[698] {11,22} 0.012328767
[699] {4,22} 0.012328767
[700] {23,28} 0.012328767
[701] {28,38} 0.012328767
[702] {12,28} 0.012328767
[703] {28,45} 0.012328767
[704] {28,44} 0.012328767
[705] {7,28} 0.012328767
[706] {20,28} 0.012328767
[707] {32,42} 0.012328767
[708] {32,44} 0.012328767
[709] {30,41} 0.012328767
[710] {8,41} 0.012328767
[711] {37,41} 0.012328767
[712] {29,42} 0.012328767
[713] {12,42} 0.012328767
[714] {36,42} 0.012328767
[715] {33,42} 0.012328767
[716] {37,42} 0.012328767
[717] {21,30} 0.012328767
[718] {23,30} 0.012328767
[719] {19,30} 0.012328767
[720] {7,30} 0.012328767
[721] {26,30} 0.012328767
[722] {30,40} 0.012328767
[723] {16,38} 0.012328767
[724] {12,16} 0.012328767
[725] {11,16} 0.012328767
[726] {21,44} 0.012328767
[727] {21,33} 0.012328767
[728] {17,21} 0.012328767
[729] {23,36} 0.012328767
[730] {23,27} 0.012328767
[731] {6,26} 0.012328767
[732] {6,8} 0.012328767
[733] {6,34} 0.012328767
[734] {26,38} 0.012328767
[735] {33,38} 0.012328767
[736] {17,38} 0.012328767
[737] {1,38} 0.012328767
[738] {24,29} 0.012328767
[739] {3,29} 0.012328767
[740] {29,36} 0.012328767
[741] {17,29} 0.012328767
[742] {20,29} 0.012328767
[743] {35,36} 0.012328767
[744] {31,35} 0.012328767
[745] {12,45} 0.012328767
[746] {10,12} 0.012328767
[747] {12,18} 0.012328767
[748] {12,37} 0.012328767
[749] {24,36} 0.012328767
[750] {18,24} 0.012328767
[751] {24,26} 0.012328767
[752] {13,24} 0.012328767
[753] {8,24} 0.012328767
[754] {4,24} 0.012328767
[755] {3,15} 0.012328767
[756] {3,43} 0.012328767
[757] {3,5} 0.012328767
[758] {36,43} 0.012328767
[759] {1,36} 0.012328767
[760] {36,40} 0.012328767
[761] {13,19} 0.012328767
[762] {33,45} 0.012328767
[763] {25,31} 0.012328767
[764] {17,25} 0.012328767
[765] {15,18} 0.012328767
[766] {15,17} 0.012328767
[767] {4,15} 0.012328767
[768] {1,15} 0.012328767
[769] {7,31} 0.012328767
[770] {13,31} 0.012328767
[771] {5,31} 0.012328767
[772] {10,39} 0.012328767
[773] {7,44} 0.012328767
[774] {18,44} 0.012328767
[775] {1,44} 0.012328767
[776] {10,26} 0.012328767
[777] {8,10} 0.012328767
[778] {10,17} 0.012328767
[779] {7,34} 0.012328767
[780] {18,27} 0.012328767
[781] {1,43} 0.012328767
[782] {8,20} 0.012328767
[783] {1,14} 0.012328767
[784] {14,34} 0.012328767
[785] {34,37} 0.012328767
[786] {9,28} 0.010958904
[787] {9,38} 0.010958904
[788] {9,35} 0.010958904
[789] {9,24} 0.010958904
[790] {9,15} 0.010958904
[791] {9,39} 0.010958904
[792] {9,26} 0.010958904
[793] {9,11} 0.010958904
[794] {9,43} 0.010958904
[795] {9,37} 0.010958904
[796] {21,22} 0.010958904
[797] {22,23} 0.010958904
[798] {22,35} 0.010958904
[799] {22,39} 0.010958904
[800] {22,43} 0.010958904
[801] {17,22} 0.010958904
[802] {28,32} 0.010958904
[803] {28,42} 0.010958904
[804] {28,35} 0.010958904
[805] {10,28} 0.010958904
[806] {5,28} 0.010958904
[807] {32,41} 0.010958904
[808] {25,32} 0.010958904
[809] {27,32} 0.010958904
[810] {20,32} 0.010958904
[811] {6,41} 0.010958904
[812] {24,41} 0.010958904
[813] {25,41} 0.010958904
[814] {15,41} 0.010958904
[815] {26,41} 0.010958904
[816] {17,41} 0.010958904
[817] {30,42} 0.010958904
[818] {25,42} 0.010958904
[819] {10,42} 0.010958904
[820] {30,35} 0.010958904
[821] {12,30} 0.010958904
[822] {15,30} 0.010958904
[823] {30,44} 0.010958904
[824] {10,30} 0.010958904
[825] {13,30} 0.010958904
[826] {16,35} 0.010958904
[827] {3,16} 0.010958904
[828] {16,33} 0.010958904
[829] {16,27} 0.010958904
[830] {7,21} 0.010958904
[831] {21,40} 0.010958904
[832] {20,21} 0.010958904
[833] {12,23} 0.010958904
[834] {3,23} 0.010958904
[835] {23,33} 0.010958904
[836] {23,37} 0.010958904
[837] {6,35} 0.010958904
[838] {4,38} 0.010958904
[839] {29,31} 0.010958904
[840] {12,35} 0.010958904
[841] {11,35} 0.010958904
[842] {4,35} 0.010958904
[843] {12,17} 0.010958904
[844] {19,24} 0.010958904
[845] {24,31} 0.010958904
[846] {24,39} 0.010958904
[847] {3,18} 0.010958904
[848] {3,33} 0.010958904
[849] {19,36} 0.010958904
[850] {13,36} 0.010958904
[851] {19,39} 0.010958904
[852] {7,45} 0.010958904
[853] {26,45} 0.010958904
[854] {18,25} 0.010958904
[855] {1,31} 0.010958904
[856] {13,44} 0.010958904
[857] {10,43} 0.010958904
[858] {10,13} 0.010958904
[859] {5,10} 0.010958904
[860] {7,13} 0.010958904
[861] {7,14} 0.010958904
[862] {33,43} 0.010958904
[863] {11,20} 0.010958904
[864] {5,40} 0.010958904
[865] {9,23} 0.009589041
[866] {9,36} 0.009589041
[867] {18,22} 0.009589041
[868] {22,26} 0.009589041
[869] {8,22} 0.009589041
[870] {1,22} 0.009589041
[871] {28,41} 0.009589041
[872] {24,28} 0.009589041
[873] {18,28} 0.009589041
[874] {28,33} 0.009589041
[875] {23,32} 0.009589041
[876] {32,35} 0.009589041
[877] {32,36} 0.009589041
[878] {15,32} 0.009589041
[879] {7,32} 0.009589041
[880] {21,41} 0.009589041
[881] {38,41} 0.009589041
[882] {35,41} 0.009589041
[883] {5,41} 0.009589041
[884] {38,42} 0.009589041
[885] {35,42} 0.009589041
[886] {31,42} 0.009589041
[887] {42,44} 0.009589041
[888] {11,30} 0.009589041
[889] {1,30} 0.009589041
[890] {16,21} 0.009589041
[891] {15,16} 0.009589041
[892] {16,39} 0.009589041
[893] {16,18} 0.009589041
[894] {3,21} 0.009589041
[895] {23,24} 0.009589041
[896] {23,31} 0.009589041
[897] {17,23} 0.009589041
[898] {3,6} 0.009589041
[899] {6,27} 0.009589041
[900] {35,38} 0.009589041
[901] {15,29} 0.009589041
[902] {14,29} 0.009589041
[903] {7,35} 0.009589041
[904] {12,31} 0.009589041
[905] {14,24} 0.009589041
[906] {3,19} 0.009589041
[907] {3,39} 0.009589041
[908] {3,26} 0.009589041
[909] {4,36} 0.009589041
[910] {11,19} 0.009589041
[911] {44,45} 0.009589041
[912] {10,45} 0.009589041
[913] {11,25} 0.009589041
[914] {15,31} 0.009589041
[915] {1,39} 0.009589041
[916] {4,44} 0.009589041
[917] {7,11} 0.009589041
[918] {4,7} 0.009589041
[919] {5,33} 0.009589041
[920] {11,34} 0.009589041
[921] {8,40} 0.009589041
[922] {9,22} 0.008219178
[923] {9,42} 0.008219178
[924] {9,45} 0.008219178
[925] {9,13} 0.008219178
[926] {9,20} 0.008219178
[927] {22,30} 0.008219178
[928] {16,22} 0.008219178
[929] {22,29} 0.008219178
[930] {12,22} 0.008219178
[931] {22,45} 0.008219178
[932] {28,29} 0.008219178
[933] {32,38} 0.008219178
[934] {32,39} 0.008219178
[935] {23,41} 0.008219178
[936] {14,41} 0.008219178
[937] {39,42} 0.008219178
[938] {4,30} 0.008219178
[939] {13,16} 0.008219178
[940] {8,16} 0.008219178
[941] {14,16} 0.008219178
[942] {21,38} 0.008219178
[943] {21,35} 0.008219178
[944] {10,21} 0.008219178
[945] {6,45} 0.008219178
[946] {15,38} 0.008219178
[947] {5,38} 0.008219178
[948] {29,45} 0.008219178
[949] {18,35} 0.008219178
[950] {3,25} 0.008219178
[951] {19,33} 0.008219178
[952] {19,37} 0.008219178
[953] {15,33} 0.008219178
[954] {11,33} 0.008219178
[955] {14,30,38} 0.008219178
[956] {7,18,23} 0.008219178
[957] {20,26,35} 0.008219178
[958] {12,24,27} 0.008219178
[959] {3,20,24} 0.008219178
[960] {11,26,44} 0.008219178
[961] {9,30} 0.006849315
[962] {3,9} 0.006849315
[963] {9,19} 0.006849315
[964] {9,44} 0.006849315
[965] {9,18} 0.006849315
[966] {9,14} 0.006849315
[967] {22,32} 0.006849315
[968] {16,28} 0.006849315
[969] {28,31} 0.006849315
[970] {14,28} 0.006849315
[971] {30,32} 0.006849315
[972] {16,32} 0.006849315
[973] {32,43} 0.006849315
[974] {18,41} 0.006849315
[975] {21,42} 0.006849315
[976] {6,42} 0.006849315
[977] {11,42} 0.006849315
[978] {29,30} 0.006849315
[979] {25,30} 0.006849315
[980] {6,23} 0.006849315
[981] {6,29} 0.006849315
[982] {6,36} 0.006849315
[983] {6,33} 0.006849315
[984] {19,29} 0.006849315
[985] {24,43} 0.006849315
[986] {31,39} 0.006849315
[987] {19,25,28} 0.006849315
[988] {15,28,34} 0.006849315
[989] {4,28,40} 0.006849315
[990] {10,16,41} 0.006849315
[991] {34,42,45} 0.006849315
[992] {5,18,42} 0.006849315
[993] {14,27,30} 0.006849315
[994] {11,14,21} 0.006849315
[995] {23,29,44} 0.006849315
[996] {23,35,43} 0.006849315
[997] {6,7,15} 0.006849315
[998] {6,18,31} 0.006849315
[999] {11,29,44} 0.006849315
[1000] {27,29,40} 0.006849315
[1001] {35,43,45} 0.006849315
[1002] {14,35,39} 0.006849315
[1003] {20,35,40} 0.006849315
[1004] {12,15,24} 0.006849315
[1005] {4,12,24} 0.006849315
[1006] {12,33,40} 0.006849315
[1007] {3,20,44} 0.006849315
[1008] {3,8,27} 0.006849315
[1009] {17,26,36} 0.006849315
[1010] {4,10,19} 0.006849315
[1011] {19,26,27} 0.006849315
[1012] {4,19,20} 0.006849315
[1013] {8,18,45} 0.006849315
[1014] {17,34,45} 0.006849315
[1015] {7,20,25} 0.006849315
[1016] {7,15,43} 0.006849315
[1017] {31,34,44} 0.006849315
[1018] {18,31,34} 0.006849315
[1019] {17,20,31} 0.006849315
[1020] {10,11,39} 0.006849315
[1021] {8,34,39} 0.006849315
[1022] {7,33,40} 0.006849315
[1023] {13,33,37} 0.006849315
[1024] {4,33,40} 0.006849315
[1025] {33,37,40} 0.006849315
[1026] {5,14,20} 0.006849315
[1027] {1,5,34} 0.006849315
[1028] {8,9} 0.005479452
[1029] {3,28} 0.005479452
[1030] {37,44} 0.005479452
[1031] {8,26} 0.005479452
[1032] {11,40} 0.005479452
[1033] {1,9,21} 0.005479452
[1034] {1,9,17} 0.005479452
[1035] {5,22,42} 0.005479452
[1036] {16,22,37} 0.005479452
[1037] {21,22,37} 0.005479452
[1038] {22,35,40} 0.005479452
[1039] {7,22,40} 0.005479452
[1040] {7,20,22} 0.005479452
[1041] {22,27,40} 0.005479452
[1042] {1,28,41} 0.005479452
[1043] {6,11,28} 0.005479452
[1044] {6,17,28} 0.005479452
[1045] {1,6,28} 0.005479452
[1046] {6,28,40} 0.005479452
[1047] {19,28,38} 0.005479452
[1048] {11,26,28} 0.005479452
[1049] {8,13,28} 0.005479452
[1050] {1,17,28} 0.005479452
[1051] {1,28,34} 0.005479452
[1052] {1,28,40} 0.005479452
[1053] {27,28,40} 0.005479452
[1054] {32,40,41} 0.005479452
[1055] {13,32,42} 0.005479452
[1056] {6,31,32} 0.005479452
[1057] {12,13,32} 0.005479452
[1058] {3,24,32} 0.005479452
[1059] {3,32,45} 0.005479452
[1060] {1,3,32} 0.005479452
[1061] {19,20,32} 0.005479452
[1062] {18,31,32} 0.005479452
[1063] {4,10,32} 0.005479452
[1064] {18,32,43} 0.005479452
[1065] {32,33,40} 0.005479452
[1066] {11,14,32} 0.005479452
[1067] {14,32,37} 0.005479452
[1068] {16,29,41} 0.005479452
[1069] {16,40,41} 0.005479452
[1070] {3,40,41} 0.005479452
[1071] {36,41,44} 0.005479452
[1072] {20,36,41} 0.005479452
[1073] {39,41,45} 0.005479452
[1074] {7,39,41} 0.005479452
[1075] {33,41,44} 0.005479452
[1076] {33,40,41} 0.005479452
[1077] {13,40,41} 0.005479452
[1078] {17,20,41} 0.005479452
[1079] {16,42,45} 0.005479452
[1080] {24,27,42} 0.005479452
[1081] {3,8,42} 0.005479452
[1082] {3,14,42} 0.005479452
[1083] {19,27,42} 0.005479452
[1084] {7,42,45} 0.005479452
[1085] {15,26,42} 0.005479452
[1086] {1,7,42} 0.005479452
[1087] {7,37,42} 0.005479452
[1088] {26,27,42} 0.005479452
[1089] {30,38,45} 0.005479452
[1090] {17,30,38} 0.005479452
[1091] {17,30,31} 0.005479452
[1092] {14,30,31} 0.005479452
[1093] {30,39,43} 0.005479452
[1094] {8,30,43} 0.005479452
[1095] {17,20,30} 0.005479452
[1096] {16,23,25} 0.005479452
[1097] {16,29,44} 0.005479452
[1098] {4,16,29} 0.005479452
[1099] {16,27,35} 0.005479452
[1100] {16,17,36} 0.005479452
[1101] {16,34,45} 0.005479452
[1102] {11,16,44} 0.005479452
[1103] {1,10,16} 0.005479452
[1104] {7,16,40} 0.005479452
[1105] {11,21,38} 0.005479452
[1106] {1,21,29} 0.005479452
[1107] {21,24,26} 0.005479452
[1108] {21,25,36} 0.005479452
[1109] {21,26,36} 0.005479452
[1110] {11,21,45} 0.005479452
[1111] {5,21,25} 0.005479452
[1112] {15,21,34} 0.005479452
[1113] {8,21,31} 0.005479452
[1114] {21,27,31} 0.005479452
[1115] {18,21,26} 0.005479452
[1116] {11,18,21} 0.005479452
[1117] {14,18,21} 0.005479452
[1118] {11,21,43} 0.005479452
[1119] {11,17,21} 0.005479452
[1120] {8,14,21} 0.005479452
[1121] {23,29,33} 0.005479452
[1122] {23,26,39} 0.005479452
[1123] {20,23,44} 0.005479452
[1124] {6,38,39} 0.005479452
[1125] {6,7,38} 0.005479452
[1126] {6,35,40} 0.005479452
[1127] {4,6,10} 0.005479452
[1128] {6,10,37} 0.005479452
[1129] {5,6,26} 0.005479452
[1130] {6,13,40} 0.005479452
[1131] {4,5,6} 0.005479452
[1132] {24,33,38} 0.005479452
[1133] {18,31,38} 0.005479452
[1134] {7,10,38} 0.005479452
[1135] {7,38,40} 0.005479452
[1136] {18,26,38} 0.005479452
[1137] {24,26,29} 0.005479452
[1138] {27,29,36} 0.005479452
[1139] {7,29,44} 0.005479452
[1140] {7,29,43} 0.005479452
[1141] {26,29,33} 0.005479452
[1142] {11,26,29} 0.005479452
[1143] {5,29,34} 0.005479452
[1144] {1,8,29} 0.005479452
[1145] {1,17,29} 0.005479452
[1146] {24,27,35} 0.005479452
[1147] {35,36,44} 0.005479452
[1148] {33,35,36} 0.005479452
[1149] {17,35,36} 0.005479452
[1150] {35,37,45} 0.005479452
[1151] {15,26,35} 0.005479452
[1152] {20,35,44} 0.005479452
[1153] {27,33,35} 0.005479452
[1154] {20,33,35} 0.005479452
[1155] {27,35,43} 0.005479452
[1156] {20,35,43} 0.005479452
[1157] {5,27,35} 0.005479452
[1158] {5,34,35} 0.005479452
[1159] {17,20,35} 0.005479452
[1160] {4,20,35} 0.005479452
[1161] {27,35,37} 0.005479452
[1162] {3,12,20} 0.005479452
[1163] {7,12,15} 0.005479452
[1164] {12,15,34} 0.005479452
[1165] {3,24,33} 0.005479452
[1166] {7,15,24} 0.005479452
[1167] {24,33,40} 0.005479452
[1168] {5,20,24} 0.005479452
[1169] {3,11,39} 0.005479452
[1170] {3,33,37} 0.005479452
[1171] {3,11,37} 0.005479452
[1172] {3,5,20} 0.005479452
[1173] {1,3,27} 0.005479452
[1174] {1,3,20} 0.005479452
[1175] {3,20,27} 0.005479452
[1176] {25,36,39} 0.005479452
[1177] {25,33,36} 0.005479452
[1178] {14,15,36} 0.005479452
[1179] {26,31,36} 0.005479452
[1180] {8,36,39} 0.005479452
[1181] {17,36,39} 0.005479452
[1182] {27,36,39} 0.005479452
[1183] {10,36,44} 0.005479452
[1184] {14,18,36} 0.005479452
[1185] {5,34,36} 0.005479452
[1186] {10,19,45} 0.005479452
[1187] {8,19,25} 0.005479452
[1188] {19,25,34} 0.005479452
[1189] {14,15,19} 0.005479452
[1190] {15,19,34} 0.005479452
[1191] {8,19,39} 0.005479452
[1192] {10,19,40} 0.005479452
[1193] {13,18,19} 0.005479452
[1194] {14,19,43} 0.005479452
[1195] {4,8,19} 0.005479452
[1196] {8,19,34} 0.005479452
[1197] {18,31,45} 0.005479452
[1198] {13,18,45} 0.005479452
[1199] {13,33,45} 0.005479452
[1200] {37,43,45} 0.005479452
[1201] {15,25,43} 0.005479452
[1202] {17,25,39} 0.005479452
[1203] {25,27,34} 0.005479452
[1204] {14,15,18} 0.005479452
[1205] {14,15,26} 0.005479452
[1206] {13,15,34} 0.005479452
[1207] {5,10,31} 0.005479452
[1208] {10,17,31} 0.005479452
[1209] {4,31,34} 0.005479452
[1210] {14,31,40} 0.005479452
[1211] {31,37,40} 0.005479452
[1212] {8,18,39} 0.005479452
[1213] {13,14,39} 0.005479452
[1214] {8,17,39} 0.005479452
[1215] {4,8,39} 0.005479452
[1216] {8,14,39} 0.005479452
[1217] {1,8,39} 0.005479452
[1218] {10,33,44} 0.005479452
[1219] {5,34,44} 0.005479452
[1220] {17,20,44} 0.005479452
[1221] {4,10,40} 0.005479452
[1222] {1,10,40} 0.005479452
[1223] {1,10,20} 0.005479452
[1224] {7,18,20} 0.005479452
[1225] {7,20,33} 0.005479452
[1226] {5,7,20} 0.005479452
[1227] {1,7,37} 0.005479452
[1228] {7,37,40} 0.005479452
[1229] {1,8,18} 0.005479452
[1230] {26,40,43} 0.005479452
[1231] {13,26,34} 0.005479452
[1232] {11,13,33} 0.005479452
[1233] {13,33,43} 0.005479452
[1234] {11,37,43} 0.005479452
[1235] {4,11,20} 0.005479452
[1236] {13,37,43} 0.005479452
[1237] {17,27,43} 0.005479452
[1238] {5,13,14} 0.005479452
[1239] {8,17,27} 0.005479452
[1240] {4,8,27} 0.005479452
[1241] {8,27,40} 0.005479452
print(head(df[1000:10000,]))
items support
[1000] {27,29,40} 0.006849315
[1001] {35,43,45} 0.006849315
[1002] {14,35,39} 0.006849315
[1003] {20,35,40} 0.006849315
[1004] {12,15,24} 0.006849315
[1005] {4,12,24} 0.006849315
library(stringr)
df$items = str_replace(string = df$items,pattern = "\\{",replacement = "")
df$items = str_replace(string = df$items,pattern = "\\}",replacement = "")
print(head(df[1000:10000,]))
items support
[1000] 27,29,40 0.006849315
[1001] 35,43,45 0.006849315
[1002] 14,35,39 0.006849315
[1003] 20,35,40 0.006849315
[1004] 12,15,24 0.006849315
[1005] 4,12,24 0.006849315
4개 이상의 조합을 얻기 위한 지지도 하향 조정
rules2 <- apriori(trans[,-2],parameter = list(support=0.0005,target="frequent itemsets"))
summary(rules2)
Apriori
Parameter specification:
confidence minval smax arem aval originalSupport maxtime support minlen
NA 0.1 1 none FALSE TRUE 5 5e-04 1
maxlen target ext
10 frequent itemsets FALSE
Algorithmic control:
filter tree heap memopt load sort verbose
0.1 TRUE TRUE FALSE TRUE 2 TRUE
Absolute minimum support count: 0
set item appearances ...[0 item(s)] done [0.00s].
set transactions ...[44 item(s), 730 transaction(s)] done [0.00s].
sorting and recoding items ... [44 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 2 3 4 5 6 done [0.01s].
writing ... [23745 set(s)] done [0.03s].
creating S4 object ... done [0.01s].
set of 23745 itemsets
most frequent items:
40 20 27 34 37 (Other)
2360 2358 2275 2269 2261 78058
element (itemset/transaction) length distribution:sizes
1 2 3 4 5 6
44 946 8545 9675 3900 635
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.000 3.000 4.000 3.773 4.000 6.000
summary of quality measures:
support
Min. :0.001370
1st Qu.:0.001370
Median :0.001370
Mean :0.002478
3rd Qu.:0.001370
Max. :0.158904
includes transaction ID lists: FALSE
mining info:
data ntransactions support confidence
trans[, -2] 730 5e-04 1
inspect(sort(rules2[rules2@quality$support >= 0.001 & rules2@quality$support <= 0.0015], by = "support")[4870:4880])
items support
[1] {1,20,34} 0.001369863
[2] {20,27,37} 0.001369863
[3] {20,34,37} 0.001369863
[4] {20,34,40} 0.001369863
[5] {3,9,22,42} 0.001369863
[6] {9,11,22,42} 0.001369863
[7] {4,9,22,42} 0.001369863
[8] {9,21,22,30} 0.001369863
[9] {6,9,22,30} 0.001369863
[10] {9,22,24,30} 0.001369863
[11] {9,11,22,30} 0.001369863
로또 선택 전략
여러가지 번호를 선택하는 방향이 있을거라고 판단 된다.
**지지도 => 그 숫자 또는 숫자의 집합이 나올 확률 **
- 개별의 숫자 6개 ( 지지도 상위 6개 ) 선택
- 1 1 1 3 / 1 1 3 1 / 1 3 1 1 / 3 1 1 1
- 1 1 2 2 / 1 2 1 2 / 1 2 2 1 / 2 1 2 1 / 2 1 1 2 / 2 2 1 1 과 같은 순으로 선택
1. 개별 지지도 상위 6개 선택
- 20,40,34,27,1,37
- 확률 0.00001290….
# 개별 확률의 곱으로 전체 확률을 표현.
prob <- 1
for(i in 1:6){
#print(paste(df[i,1]," ",df[i,2]))
#print(df[i,1])
prob <- prob * df[i,2]
print(paste("cusum : ",prob))
}
print(prob)
[1] "cusum : 0.158904109589041"
[1] "cusum : 0.0248151623193845"
[1] "cusum : 0.00384125115354856"
[1] "cusum : 0.000584080654854644"
[1] "cusum : 8.72120429851455e-05"
[1] "cusum : 1.29026036197202e-05"
[1] 1.29026e-05
2. 개별 항목 3개, 3개 집합 1개 선택
- 최상위 개별 선택 3개 항목
- {20} 0.1589041
- {40} 0.1561644
- {34} 0.1547945
- 3개 항목 최상위 위의 숫자를 제외한
- {19,25,28} 0.006849315
- 20,40,34,19,25,28
- 확률 : 0.0000263
3. 3개의 집단 2개 선택
- {19,25,28} 0.006849315
- {10,16,41} 0.006849315
- 확률 : 0.000049
4 + 2 Set 조합
- {3,9,22,42} 0.001369863
- {20,35} 0.02876712
- 확률 : 0.000042
결론
- 개별 항목이 나올 확률은 비슷하게 나온다. => 즉, 특정 숫자가 많이 나오지는 않는다.
- 개별 항목이 확률이 높게 나타나더라도 조합의 갯수가 많은 숫자를 선택하는 것이 당첨될 확률이 높다.
- 현재까지 나온 숫자로 본 결과 3,3개의 조합이 가장 크게 나왔다.
- 하지만 최종 결론은 수치와 데이터를 믿고 로또를 하는 일은 수치를 다루는 사람이 아니라고 생각되며, 운과 행운을 빌어 재미삼아 하길 기원한다.