Skip to content
Snippets Groups Projects
Commit b692c7a2 authored by Lani Jung's avatar Lani Jung
Browse files

delete A_priori from kaggle deom code

parent 0e10b95c
Branches
No related tags found
No related merge requests found
%% Cell type:code id: tags:
```
import numpy as np
import pandas as pd
from mlxtend.frequent_patterns import apriori,association_rules
df_train = pd.read_csv("../../dataset/Train_data.csv")
df_train.info()
```
%% Output
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 25192 entries, 0 to 25191
Data columns (total 42 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 duration 25192 non-null int64
1 protocol_type 25192 non-null object
2 service 25192 non-null object
3 flag 25192 non-null object
4 src_bytes 25192 non-null int64
5 dst_bytes 25192 non-null int64
6 land 25192 non-null int64
7 wrong_fragment 25192 non-null int64
8 urgent 25192 non-null int64
9 hot 25192 non-null int64
10 num_failed_logins 25192 non-null int64
11 logged_in 25192 non-null int64
12 num_compromised 25192 non-null int64
13 root_shell 25192 non-null int64
14 su_attempted 25192 non-null int64
15 num_root 25192 non-null int64
16 num_file_creations 25192 non-null int64
17 num_shells 25192 non-null int64
18 num_access_files 25192 non-null int64
19 num_outbound_cmds 25192 non-null int64
20 is_host_login 25192 non-null int64
21 is_guest_login 25192 non-null int64
22 count 25192 non-null int64
23 srv_count 25192 non-null int64
24 serror_rate 25192 non-null float64
25 srv_serror_rate 25192 non-null float64
26 rerror_rate 25192 non-null float64
27 srv_rerror_rate 25192 non-null float64
28 same_srv_rate 25192 non-null float64
29 diff_srv_rate 25192 non-null float64
30 srv_diff_host_rate 25192 non-null float64
31 dst_host_count 25192 non-null int64
32 dst_host_srv_count 25192 non-null int64
33 dst_host_same_srv_rate 25192 non-null float64
34 dst_host_diff_srv_rate 25192 non-null float64
35 dst_host_same_src_port_rate 25192 non-null float64
36 dst_host_srv_diff_host_rate 25192 non-null float64
37 dst_host_serror_rate 25192 non-null float64
38 dst_host_srv_serror_rate 25192 non-null float64
39 dst_host_rerror_rate 25192 non-null float64
40 dst_host_srv_rerror_rate 25192 non-null float64
41 class 25192 non-null object
dtypes: float64(15), int64(23), object(4)
memory usage: 8.1+ MB
%% Cell type:code id: tags:
```
df_train.head(n=10)
```
%% Output
duration protocol_type service flag src_bytes dst_bytes land \
0 0 tcp ftp_data SF 491 0 0
1 0 udp other SF 146 0 0
2 0 tcp private S0 0 0 0
3 0 tcp http SF 232 8153 0
4 0 tcp http SF 199 420 0
5 0 tcp private REJ 0 0 0
6 0 tcp private S0 0 0 0
7 0 tcp private S0 0 0 0
8 0 tcp remote_job S0 0 0 0
9 0 tcp private S0 0 0 0
wrong_fragment urgent hot ... dst_host_srv_count \
0 0 0 0 ... 25
1 0 0 0 ... 1
2 0 0 0 ... 26
3 0 0 0 ... 255
4 0 0 0 ... 255
5 0 0 0 ... 19
6 0 0 0 ... 9
7 0 0 0 ... 15
8 0 0 0 ... 23
9 0 0 0 ... 13
dst_host_same_srv_rate dst_host_diff_srv_rate \
0 0.17 0.03
1 0.00 0.60
2 0.10 0.05
3 1.00 0.00
4 1.00 0.00
5 0.07 0.07
6 0.04 0.05
7 0.06 0.07
8 0.09 0.05
9 0.05 0.06
dst_host_same_src_port_rate dst_host_srv_diff_host_rate \
0 0.17 0.00
1 0.88 0.00
2 0.00 0.00
3 0.03 0.04
4 0.00 0.00
5 0.00 0.00
6 0.00 0.00
7 0.00 0.00
8 0.00 0.00
9 0.00 0.00
dst_host_serror_rate dst_host_srv_serror_rate dst_host_rerror_rate \
0 0.00 0.00 0.05
1 0.00 0.00 0.00
2 1.00 1.00 0.00
3 0.03 0.01 0.00
4 0.00 0.00 0.00
5 0.00 0.00 1.00
6 1.00 1.00 0.00
7 1.00 1.00 0.00
8 1.00 1.00 0.00
9 1.00 1.00 0.00
dst_host_srv_rerror_rate class
0 0.00 normal
1 0.00 normal
2 0.00 anomaly
3 0.01 normal
4 0.00 normal
5 1.00 anomaly
6 0.00 anomaly
7 0.00 anomaly
8 0.00 anomaly
9 0.00 anomaly
[10 rows x 42 columns]
%% Cell type:code id: tags:
```
data_train = pd.get_dummies(df_train,columns = ["protocol_type", "flag", "service", "class"],)
data_train.head()
```
%% Output
duration src_bytes dst_bytes land wrong_fragment urgent hot \
0 0 491 0 0 0 0 0
1 0 146 0 0 0 0 0
2 0 0 0 0 0 0 0
3 0 232 8153 0 0 0 0
4 0 199 420 0 0 0 0
num_failed_logins logged_in num_compromised ... service_tim_i \
0 0 0 0 ... 0
1 0 0 0 ... 0
2 0 0 0 ... 0
3 0 1 0 ... 0
4 0 1 0 ... 0
service_time service_urh_i service_urp_i service_uucp \
0 0 0 0 0
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
service_uucp_path service_vmnet service_whois class_anomaly \
0 0 0 0 0
1 0 0 0 0
2 0 0 0 1
3 0 0 0 0
4 0 0 0 0
class_normal
0 1
1 1
2 0
3 1
4 1
[5 rows x 120 columns]
%% Cell type:code id: tags:
```
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
# extract numerical attributes and scale it to have zero mean and unit variance
cols = data_train.select_dtypes(include=['float64','int64']).columns
sc_train = scaler.fit_transform(data_train.select_dtypes(include=['float64','int64']))
# turn the result back to a dataframe
sc_traindf = pd.DataFrame(sc_train, columns = cols)
sc_traindf.head(n=10)
```
%% Output
duration src_bytes dst_bytes land wrong_fragment urgent \
0 -0.113551 -0.009889 -0.039310 -0.00891 -0.091223 -0.006301
1 -0.113551 -0.010032 -0.039310 -0.00891 -0.091223 -0.006301
2 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
3 -0.113551 -0.009996 0.052473 -0.00891 -0.091223 -0.006301
4 -0.113551 -0.010010 -0.034582 -0.00891 -0.091223 -0.006301
5 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
6 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
7 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
8 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
9 -0.113551 -0.010093 -0.039310 -0.00891 -0.091223 -0.006301
hot num_failed_logins logged_in num_compromised ... \
0 -0.091933 -0.02622 -0.807626 -0.021873 ...
1 -0.091933 -0.02622 -0.807626 -0.021873 ...
2 -0.091933 -0.02622 -0.807626 -0.021873 ...
3 -0.091933 -0.02622 1.238197 -0.021873 ...
4 -0.091933 -0.02622 1.238197 -0.021873 ...
5 -0.091933 -0.02622 -0.807626 -0.021873 ...
6 -0.091933 -0.02622 -0.807626 -0.021873 ...
7 -0.091933 -0.02622 -0.807626 -0.021873 ...
8 -0.091933 -0.02622 -0.807626 -0.021873 ...
9 -0.091933 -0.02622 -0.807626 -0.021873 ...
dst_host_count dst_host_srv_count dst_host_same_srv_rate \
0 -0.328634 -0.813985 -0.779157
1 0.732059 -1.030895 -1.157831
2 0.732059 -0.804947 -0.935081
3 -1.540854 1.264742 1.069663
4 0.732059 1.264742 1.069663
5 0.732059 -0.868212 -1.001906
6 0.732059 -0.958592 -1.068731
7 0.732059 -0.904364 -1.024181
8 0.732059 -0.832060 -0.957356
9 0.732059 -0.922440 -1.046456
dst_host_diff_srv_rate dst_host_same_src_port_rate \
0 -0.280673 0.073120
1 2.764403 2.375620
2 -0.173828 -0.478183
3 -0.440940 -0.380894
4 -0.440940 -0.478183
5 -0.066984 -0.478183
6 -0.173828 -0.478183
7 -0.066984 -0.478183
8 -0.173828 -0.478183
9 -0.120406 -0.478183
dst_host_srv_diff_host_rate dst_host_serror_rate \
0 -0.287993 -0.641804
1 -0.287993 -0.641804
2 -0.287993 1.603834
3 0.073759 -0.574435
4 -0.287993 -0.641804
5 -0.287993 -0.641804
6 -0.287993 1.603834
7 -0.287993 1.603834
8 -0.287993 1.603834
9 -0.287993 1.603834
dst_host_srv_serror_rate dst_host_rerror_rate dst_host_srv_rerror_rate
0 -0.627365 -0.221668 -0.374281
1 -0.627365 -0.385140 -0.374281
2 1.614454 -0.385140 -0.374281
3 -0.604947 -0.385140 -0.342768
4 -0.627365 -0.385140 -0.374281
5 -0.627365 2.884296 2.777041
6 1.614454 -0.385140 -0.374281
7 1.614454 -0.385140 -0.374281
8 1.614454 -0.385140 -0.374281
9 1.614454 -0.385140 -0.374281
[10 rows x 38 columns]
%% Cell type:code id: tags:
```
def encode_units(x):
if x<=0:
return 0
if x>=0 :
return 1
train_df = sc_traindf.applymap(encode_units)
train_df.head(n=10)
```
%% Output
duration src_bytes dst_bytes land wrong_fragment urgent hot \
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0
3 0 0 1 0 0 0 0
4 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0
num_failed_logins logged_in num_compromised ... dst_host_count \
0 0 0 0 ... 0
1 0 0 0 ... 1
2 0 0 0 ... 1
3 0 1 0 ... 0
4 0 1 0 ... 1
5 0 0 0 ... 1
6 0 0 0 ... 1
7 0 0 0 ... 1
8 0 0 0 ... 1
9 0 0 0 ... 1
dst_host_srv_count dst_host_same_srv_rate dst_host_diff_srv_rate \
0 0 0 0
1 0 0 1
2 0 0 0
3 1 1 0
4 1 1 0
5 0 0 0
6 0 0 0
7 0 0 0
8 0 0 0
9 0 0 0
dst_host_same_src_port_rate dst_host_srv_diff_host_rate \
0 1 0
1 1 0
2 0 0
3 0 1
4 0 0
5 0 0
6 0 0
7 0 0
8 0 0
9 0 0
dst_host_serror_rate dst_host_srv_serror_rate dst_host_rerror_rate \
0 0 0 0
1 0 0 0
2 1 1 0
3 0 0 0
4 0 0 0
5 0 0 1
6 1 1 0
7 1 1 0
8 1 1 0
9 1 1 0
dst_host_srv_rerror_rate
0 0
1 0
2 0
3 0
4 0
5 1
6 0
7 0
8 0
9 0
[10 rows x 38 columns]
%% Cell type:code id: tags:
```
columns = data_train.columns
colname = ['duration', 'src_bytes', 'dst_bytes', 'land', 'wrong_fragment',
'urgent', 'hot', 'num_failed_logins', 'logged_in', 'num_compromised',
'root_shell', 'su_attempted', 'num_root', 'num_file_creations',
'num_shells', 'num_access_files', 'num_outbound_cmds', 'is_host_login',
'is_guest_login', 'count', 'srv_count', 'serror_rate',
'srv_serror_rate', 'rerror_rate', 'srv_rerror_rate', 'same_srv_rate',
'diff_srv_rate', 'srv_diff_host_rate', 'dst_host_count',
'dst_host_srv_count', 'dst_host_same_srv_rate',
'dst_host_diff_srv_rate', 'dst_host_same_src_port_rate',
'dst_host_srv_diff_host_rate', 'dst_host_serror_rate',
'dst_host_srv_serror_rate', 'dst_host_rerror_rate',
'dst_host_srv_rerror_rate']
for col in columns :
for j in colname :
if col == j :
data_train[col] = train_df[col]
data_train.head()
```
%% Output
duration src_bytes dst_bytes land wrong_fragment urgent hot \
0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0
3 0 0 1 0 0 0 0
4 0 0 0 0 0 0 0
num_failed_logins logged_in num_compromised ... service_tim_i \
0 0 0 0 ... 0
1 0 0 0 ... 0
2 0 0 0 ... 0
3 0 1 0 ... 0
4 0 1 0 ... 0
service_time service_urh_i service_urp_i service_uucp \
0 0 0 0 0
1 0 0 0 0
2 0 0 0 0
3 0 0 0 0
4 0 0 0 0
service_uucp_path service_vmnet service_whois class_anomaly \
0 0 0 0 0
1 0 0 0 0
2 0 0 0 1
3 0 0 0 0
4 0 0 0 0
class_normal
0 1
1 1
2 0
3 1
4 1
[5 rows x 120 columns]
%% Cell type:code id: tags:
```
data_train[['num_outbound_cmds','is_host_login']].head()
for col in data_train.columns :
if data_train[col].mean() == 0 :
print(col)
```
%% Output
num_outbound_cmds
is_host_login
%% Cell type:code id: tags:
```
frequent_itemsets = apriori ( data_train , min_support = 0.01 , use_colnames=True ,max_len =2)
result_desc = frequent_itemsets.sort_values(['support'],ascending =[False])
result_desc
```
%% Output
support itemsets
26 0.814782 (protocol_type_tcp)
15 0.643022 (dst_host_count)
12 0.622102 (same_srv_rate)
32 0.594355 (flag_SF)
227 0.562837 (same_srv_rate, flag_SF)
.. ... ...
281 0.010241 (dst_host_count, flag_RSTO)
100 0.010241 (num_compromised, flag_SF)
287 0.010162 (service_finger, dst_host_count)
47 0.010043 (duration, srv_rerror_rate)
46 0.010043 (rerror_rate, duration)
[467 rows x 2 columns]
%% Cell type:code id: tags:
```
rules = association_rules(result_desc , metric = "confidence" , min_threshold = 0.90)
rules = rules.sort_values(['confidence','lift'], ascending=[False , False])
rules
```
%% Output
antecedents consequents antecedent support \
104 (service_eco_i) (protocol_type_icmp) 0.036083
111 (service_ecr_i) (protocol_type_icmp) 0.024333
91 (service_domain_u) (protocol_type_udp) 0.072245
118 (flag_RSTR) (rerror_rate) 0.019728
131 (flag_RSTO) (rerror_rate) 0.012067
.. ... ... ...
122 (hot) (flag_SF) 0.020641
0 (same_srv_rate) (flag_SF) 0.622102
84 (dst_bytes) (service_http) 0.098206
109 (service_other) (dst_host_count) 0.034058
75 (srv_count) (dst_host_same_srv_rate) 0.130597
consequent support support confidence lift leverage conviction
104 0.065695 0.036083 1.000000 15.221752 0.033712 inf
111 0.065695 0.024333 1.000000 15.221752 0.022735 inf
91 0.119522 0.072245 1.000000 8.366656 0.063610 inf
118 0.124127 0.019728 1.000000 8.056284 0.017280 inf
131 0.124127 0.012067 1.000000 8.056284 0.010569 inf
.. ... ... ... ... ... ...
122 0.594355 0.018736 0.907692 1.527188 0.006468 4.394484
0 0.594355 0.562837 0.904735 1.522212 0.193088 4.258046
84 0.317680 0.088719 0.903395 2.843725 0.057521 7.063009
109 0.643022 0.030764 0.903263 1.404717 0.008863 3.690211
75 0.498730 0.117855 0.902432 1.809460 0.052722 5.137630
[138 rows x 9 columns]
%% Cell type:code id: tags:
```
rules[rules['consequents'] == {'class_anomaly'}]
```
%% Output
antecedents consequents antecedent support \
45 (flag_S0) (class_anomaly) 0.278223
44 (dst_host_srv_serror_rate) (class_anomaly) 0.281478
36 (srv_serror_rate) (class_anomaly) 0.286440
43 (dst_host_serror_rate) (class_anomaly) 0.287512
31 (serror_rate) (class_anomaly) 0.288544
56 (service_private) (class_anomaly) 0.172714
123 (flag_RSTR) (class_anomaly) 0.019728
113 (service_ecr_i) (class_anomaly) 0.024333
consequent support support confidence lift leverage conviction
45 0.46614 0.275048 0.988586 2.120792 0.145357 46.772805
44 0.46614 0.277072 0.984346 2.111697 0.145864 34.104513
36 0.46614 0.277707 0.969512 2.079873 0.144186 17.510607
43 0.46614 0.277191 0.964103 2.068270 0.143170 14.872106
31 0.46614 0.278184 0.964094 2.068250 0.143682 14.868307
56 0.46614 0.164814 0.954263 2.047160 0.084306 11.672486
123 0.46614 0.018617 0.943662 2.024417 0.009421 9.476014
113 0.46614 0.022825 0.938010 2.012292 0.011482 8.612004
%% Cell type:code id: tags:
```
frequent_itemsets = apriori ( data_train , min_support = 0.33 , use_colnames=True ,max_len =2)
result_desc = frequent_itemsets.sort_values(['support'],ascending =[False])
result_desc
```
%% Output
support itemsets
6 0.814782 (protocol_type_tcp)
3 0.643022 (dst_host_count)
2 0.622102 (same_srv_rate)
7 0.594355 (flag_SF)
19 0.562837 (same_srv_rate, flag_SF)
9 0.533860 (class_normal)
21 0.516077 (dst_host_count, protocol_type_tcp)
20 0.509963 (same_srv_rate, class_normal)
33 0.502660 (class_normal, flag_SF)
5 0.498730 (dst_host_same_srv_rate)
17 0.492339 (same_srv_rate, dst_host_same_srv_rate)
28 0.469117 (dst_host_same_srv_rate, flag_SF)
8 0.466140 (class_anomaly)
18 0.460027 (same_srv_rate, protocol_type_tcp)
4 0.435773 (dst_host_srv_count)
29 0.432637 (dst_host_same_srv_rate, class_normal)
16 0.430891 (same_srv_rate, dst_host_srv_count)
23 0.426485 (dst_host_same_srv_rate, dst_host_srv_count)
32 0.423984 (class_normal, protocol_type_tcp)
25 0.412234 (dst_host_srv_count, flag_SF)
30 0.409138 (protocol_type_tcp, flag_SF)
26 0.401437 (dst_host_srv_count, class_normal)
22 0.395403 (class_anomaly, dst_host_count)
0 0.394768 (logged_in)
12 0.394768 (protocol_type_tcp, logged_in)
31 0.390799 (class_anomaly, protocol_type_tcp)
13 0.387861 (flag_SF, logged_in)
10 0.387702 (same_srv_rate, logged_in)
14 0.378533 (class_normal, logged_in)
27 0.365314 (dst_host_same_srv_rate, protocol_type_tcp)
1 0.364481 (count)
15 0.351818 (dst_host_count, count)
11 0.337051 (dst_host_same_srv_rate, logged_in)
24 0.333519 (dst_host_srv_count, protocol_type_tcp)
%% Cell type:code id: tags:
```
rules = association_rules(result_desc , metric = "confidence" , min_threshold = 0.75)
rules = rules.sort_values(['confidence','lift'], ascending=[False , False])
rules
```
%% Output
antecedents consequents antecedent support \
21 (logged_in) (protocol_type_tcp) 0.394768
13 (dst_host_srv_count) (same_srv_rate) 0.435773
8 (dst_host_same_srv_rate) (same_srv_rate) 0.498730
23 (logged_in) (flag_SF) 0.394768
24 (logged_in) (same_srv_rate) 0.394768
15 (dst_host_srv_count) (dst_host_same_srv_rate) 0.435773
26 (count) (dst_host_count) 0.364481
25 (logged_in) (class_normal) 0.394768
4 (class_normal) (same_srv_rate) 0.533860
1 (flag_SF) (same_srv_rate) 0.594355
17 (dst_host_srv_count) (flag_SF) 0.435773
5 (class_normal) (flag_SF) 0.533860
9 (dst_host_same_srv_rate) (flag_SF) 0.498730
18 (dst_host_srv_count) (class_normal) 0.435773
0 (same_srv_rate) (flag_SF) 0.622102
11 (dst_host_same_srv_rate) (class_normal) 0.498730
14 (dst_host_same_srv_rate) (dst_host_srv_count) 0.498730
27 (logged_in) (dst_host_same_srv_rate) 0.394768
20 (class_anomaly) (dst_host_count) 0.466140
6 (flag_SF) (class_normal) 0.594355
22 (class_anomaly) (protocol_type_tcp) 0.466140
3 (same_srv_rate) (class_normal) 0.622102
12 (class_normal) (dst_host_same_srv_rate) 0.533860
2 (dst_host_count) (protocol_type_tcp) 0.643022
16 (class_normal) (protocol_type_tcp) 0.533860
7 (same_srv_rate) (dst_host_same_srv_rate) 0.622102
10 (flag_SF) (dst_host_same_srv_rate) 0.594355
28 (dst_host_srv_count) (protocol_type_tcp) 0.435773
19 (class_normal) (dst_host_srv_count) 0.533860
consequent support support confidence lift leverage conviction
21 0.814782 0.394768 1.000000 1.227321 0.073118 inf
13 0.622102 0.430891 0.988796 1.589443 0.159795 33.728142
8 0.622102 0.492339 0.987186 1.586854 0.182078 29.490107
23 0.594355 0.387861 0.982504 1.653058 0.153229 23.184690
24 0.622102 0.387702 0.982102 1.578682 0.142116 21.113444
15 0.498730 0.426485 0.978685 1.962355 0.209152 23.516858
26 0.643022 0.351818 0.965258 1.501129 0.117449 10.275159
25 0.533860 0.378533 0.958874 1.796115 0.167782 11.334383
4 0.622102 0.509963 0.955238 1.535500 0.177848 8.442437
1 0.622102 0.562837 0.946971 1.522212 0.193088 7.126276
17 0.594355 0.412234 0.945983 1.591612 0.153230 7.509556
5 0.594355 0.502660 0.941557 1.584165 0.185357 6.940859
9 0.594355 0.469117 0.940624 1.582595 0.172694 6.831795
18 0.533860 0.401437 0.921206 1.725557 0.168795 5.915937
0 0.594355 0.562837 0.904735 1.522212 0.193088 4.258046
11 0.533860 0.432637 0.867479 1.624918 0.166386 3.517468
14 0.435773 0.426485 0.855142 1.962355 0.209152 3.895025
27 0.498730 0.337051 0.853796 1.711941 0.140169 3.428564
20 0.643022 0.395403 0.848250 1.319163 0.095665 2.352412
6 0.533860 0.502660 0.845722 1.584165 0.185357 3.021435
22 0.814782 0.390799 0.838372 1.028952 0.010996 1.145948
3 0.533860 0.509963 0.819742 1.535500 0.177848 2.585963
12 0.498730 0.432637 0.810395 1.624918 0.166386 2.643758
2 0.814782 0.516077 0.802580 0.985024 -0.007846 0.938192
16 0.814782 0.423984 0.794185 0.974721 -0.010996 0.899924
7 0.498730 0.492339 0.791411 1.586854 0.182078 2.403153
10 0.498730 0.469117 0.789287 1.582595 0.172694 2.378928
28 0.814782 0.333519 0.765349 0.939329 -0.021542 0.789332
19 0.435773 0.401437 0.751952 1.725557 0.168795 2.274666
%% Cell type:code id: tags:
```
rules[rules['consequents'] == {'class_normal'}]
```
%% Output
antecedents consequents antecedent support \
25 (logged_in) (class_normal) 0.394768
18 (dst_host_srv_count) (class_normal) 0.435773
11 (dst_host_same_srv_rate) (class_normal) 0.498730
6 (flag_SF) (class_normal) 0.594355
3 (same_srv_rate) (class_normal) 0.622102
consequent support support confidence lift leverage conviction
25 0.53386 0.378533 0.958874 1.796115 0.167782 11.334383
18 0.53386 0.401437 0.921206 1.725557 0.168795 5.915937
11 0.53386 0.432637 0.867479 1.624918 0.166386 3.517468
6 0.53386 0.502660 0.845722 1.584165 0.185357 3.021435
3 0.53386 0.509963 0.819742 1.535500 0.177848 2.585963
%% Cell type:code id: tags:
```
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment