622 KiB
622 KiB
In [2]:
import pickle
import pandas as pd
from sklearn import tree
data = pd.read_csv("data-turbine/clear-data-nox.csv")
model = pickle.load(open("data-turbine/tree-nox.model.sav", "rb"))
features = (
data
.drop(["NOX"], axis=1)
.columns.values.tolist()
)
rules = tree.export_text(model, feature_names=features)
print(rules)
|--- AT <= 16.96 | |--- TEY <= 118.41 | | |--- AT <= 10.84 | | | |--- AT <= 7.75 | | | | |--- AFDP <= 3.08 | | | | | |--- AFDP <= 2.68 | | | | | | |--- AFDP <= 2.54 | | | | | | | |--- value: [102.29] | | | | | | |--- AFDP > 2.54 | | | | | | | |--- value: [93.81] | | | | | |--- AFDP > 2.68 | | | | | | |--- AP <= 1004.50 | | | | | | | |--- value: [65.69] | | | | | | |--- AP > 1004.50 | | | | | | | |--- value: [84.70] | | | | |--- AFDP > 3.08 | | | | | |--- AT <= 6.44 | | | | | | |--- AP <= 1027.60 | | | | | | | |--- value: [105.70] | | | | | | |--- AP > 1027.60 | | | | | | | |--- value: [94.80] | | | | | |--- AT > 6.44 | | | | | | |--- AP <= 1022.35 | | | | | | | |--- value: [92.55] | | | | | | |--- AP > 1022.35 | | | | | | | |--- value: [104.67] | | | |--- AT > 7.75 | | | | |--- TEY <= 105.73 | | | | | |--- AP <= 1019.95 | | | | | | |--- AFDP <= 3.30 | | | | | | | |--- value: [100.50] | | | | | | |--- AFDP > 3.30 | | | | | | | |--- value: [118.67] | | | | | |--- AP > 1019.95 | | | | | | |--- AT <= 9.77 | | | | | | | |--- value: [109.96] | | | | | | |--- AT > 9.77 | | | | | | | |--- value: [115.86] | | | | |--- TEY > 105.73 | | | | | |--- TEY <= 112.78 | | | | | | |--- AFDP <= 3.07 | | | | | | | |--- value: [86.03] | | | | | | |--- AFDP > 3.07 | | | | | | | |--- value: [92.86] | | | | | |--- TEY > 112.78 | | | | | | |--- AT <= 8.93 | | | | | | | |--- value: [87.68] | | | | | | |--- AT > 8.93 | | | | | | | |--- value: [75.77] | | |--- AT > 10.84 | | | |--- TEY <= 105.88 | | | | |--- AFDP <= 3.11 | | | | | |--- AP <= 1017.55 | | | | | | |--- AP <= 1009.20 | | | | | | | |--- value: [76.47] | | | | | | |--- AP > 1009.20 | | | | | | | |--- value: [85.34] | | | | | |--- AP > 1017.55 | | | | | | |--- AT <= 13.47 | | | | | | | |--- value: [99.92] | | | | | | |--- AT > 13.47 | | | | | | | |--- value: [89.17] | | | | |--- AFDP > 3.11 | | | | | |--- AFDP <= 3.43 | | | | | | |--- AT <= 15.98 | | | | | | | |--- value: [112.88] | | | | | | |--- AT > 15.98 | | | | | | | |--- value: [90.33] | | | | | |--- AFDP > 3.43 | | | | | | |--- AP <= 1019.55 | | | | | | | |--- value: [94.65] | | | | | | |--- AP > 1019.55 | | | | | | | |--- value: [75.20] | | | |--- TEY > 105.88 | | | | |--- AT <= 14.18 | | | | | |--- AT <= 12.96 | | | | | | |--- AFDP <= 3.28 | | | | | | | |--- value: [77.01] | | | | | | |--- AFDP > 3.28 | | | | | | | |--- value: [81.37] | | | | | |--- AT > 12.96 | | | | | | |--- AFDP <= 3.18 | | | | | | | |--- value: [71.14] | | | | | | |--- AFDP > 3.18 | | | | | | | |--- value: [77.02] | | | | |--- AT > 14.18 | | | | | |--- AFDP <= 3.23 | | | | | | |--- AFDP <= 2.64 | | | | | | | |--- value: [69.02] | | | | | | |--- AFDP > 2.64 | | | | | | | |--- value: [63.94] | | | | | |--- AFDP > 3.23 | | | | | | |--- AT <= 15.63 | | | | | | | |--- value: [73.26] | | | | | | |--- AT > 15.63 | | | | | | | |--- value: [68.00] | |--- TEY > 118.41 | | |--- TEY <= 154.69 | | | |--- AT <= 10.44 | | | | |--- AFDP <= 3.69 | | | | | |--- AFDP <= 3.08 | | | | | | |--- AT <= 7.32 | | | | | | | |--- value: [81.58] | | | | | | |--- AT > 7.32 | | | | | | | |--- value: [75.62] | | | | | |--- AFDP > 3.08 | | | | | | |--- AT <= 7.40 | | | | | | | |--- value: [72.62] | | | | | | |--- AT > 7.40 | | | | | | | |--- value: [68.88] | | | | |--- AFDP > 3.69 | | | | | |--- TEY <= 140.11 | | | | | | |--- TEY <= 129.48 | | | | | | | |--- value: [88.91] | | | | | | |--- TEY > 129.48 | | | | | | | |--- value: [80.23] | | | | | |--- TEY > 140.11 | | | | | | |--- AP <= 1026.90 | | | | | | | |--- value: [75.41] | | | | | | |--- AP > 1026.90 | | | | | | | |--- value: [65.58] | | | |--- AT > 10.44 | | | | |--- AFDP <= 3.85 | | | | | |--- AFDP <= 3.22 | | | | | | |--- AP <= 1011.45 | | | | | | | |--- value: [72.39] | | | | | | |--- AP > 1011.45 | | | | | | | |--- value: [67.36] | | | | | |--- AFDP > 3.22 | | | | | | |--- TEY <= 132.02 | | | | | | | |--- value: [60.59] | | | | | | |--- TEY > 132.02 | | | | | | | |--- value: [65.98] | | | | |--- AFDP > 3.85 | | | | | |--- AT <= 13.81 | | | | | | |--- TEY <= 134.82 | | | | | | | |--- value: [74.76] | | | | | | |--- TEY > 134.82 | | | | | | | |--- value: [72.19] | | | | | |--- AT > 13.81 | | | | | | |--- TEY <= 131.55 | | | | | | | |--- value: [65.92] | | | | | | |--- TEY > 131.55 | | | | | | | |--- value: [70.24] | | |--- TEY > 154.69 | | | |--- AP <= 1021.95 | | | | |--- AFDP <= 4.02 | | | | | |--- AP <= 1010.05 | | | | | | |--- AT <= 14.50 | | | | | | | |--- value: [66.77] | | | | | | |--- AT > 14.50 | | | | | | | |--- value: [72.38] | | | | | |--- AP > 1010.05 | | | | | | |--- AT <= 14.17 | | | | | | | |--- value: [62.56] | | | | | | |--- AT > 14.17 | | | | | | | |--- value: [57.23] | | | | |--- AFDP > 4.02 | | | | | |--- AP <= 1003.35 | | | | | | |--- TEY <= 161.49 | | | | | | | |--- value: [71.07] | | | | | | |--- TEY > 161.49 | | | | | | | |--- value: [77.45] | | | | | |--- AP > 1003.35 | | | | | | |--- AT <= 12.80 | | | | | | | |--- value: [67.79] | | | | | | |--- AT > 12.80 | | | | | | | |--- value: [66.01] | | | |--- AP > 1021.95 | | | | |--- AP <= 1028.65 | | | | | |--- AFDP <= 4.64 | | | | | | |--- AFDP <= 4.46 | | | | | | | |--- value: [62.99] | | | | | | |--- AFDP > 4.46 | | | | | | | |--- value: [55.18] | | | | | |--- AFDP > 4.64 | | | | | | |--- AFDP <= 4.68 | | | | | | | |--- value: [80.15] | | | | | | |--- AFDP > 4.68 | | | | | | | |--- value: [64.14] | | | | |--- AP > 1028.65 | | | | | |--- AFDP <= 4.31 | | | | | | |--- AT <= 7.17 | | | | | | | |--- value: [59.32] | | | | | | |--- AT > 7.17 | | | | | | | |--- value: [68.59] | | | | | |--- AFDP > 4.31 | | | | | | |--- AFDP <= 5.00 | | | | | | | |--- value: [50.78] | | | | | | |--- AFDP > 5.00 | | | | | | | |--- value: [60.61] |--- AT > 16.96 | |--- TEY <= 131.89 | | |--- AT <= 20.42 | | | |--- TEY <= 106.33 | | | | |--- AFDP <= 2.25 | | | | | |--- AT <= 17.35 | | | | | | |--- value: [110.76] | | | | | |--- AT > 17.35 | | | | | | |--- value: [115.68] | | | | |--- AFDP > 2.25 | | | | | |--- AFDP <= 2.65 | | | | | | |--- TEY <= 100.91 | | | | | | | |--- value: [79.89] | | | | | | |--- TEY > 100.91 | | | | | | | |--- value: [64.11] | | | | | |--- AFDP > 2.65 | | | | | | |--- AT <= 19.34 | | | | | | | |--- value: [82.01] | | | | | | |--- AT > 19.34 | | | | | | | |--- value: [72.42] | | | |--- TEY > 106.33 | | | | |--- AFDP <= 3.91 | | | | | |--- TEY <= 127.09 | | | | | | |--- AT <= 18.32 | | | | | | | |--- value: [62.18] | | | | | | |--- AT > 18.32 | | | | | | | |--- value: [58.25] | | | | | |--- TEY > 127.09 | | | | | | |--- AFDP <= 3.23 | | | | | | | |--- value: [75.86] | | | | | | |--- AFDP > 3.23 | | | | | | | |--- value: [53.85] | | | | |--- AFDP > 3.91 | | | | | |--- TEY <= 116.94 | | | | | | |--- AFDP <= 4.41 | | | | | | | |--- value: [69.74] | | | | | | |--- AFDP > 4.41 | | | | | | | |--- value: [64.69] | | | | | |--- TEY > 116.94 | | | | | | |--- AFDP <= 4.54 | | | | | | | |--- value: [59.59] | | | | | | |--- AFDP > 4.54 | | | | | | | |--- value: [68.11] | | |--- AT > 20.42 | | | |--- AT <= 22.75 | | | | |--- AFDP <= 4.25 | | | | | |--- TEY <= 103.75 | | | | | | |--- AT <= 22.49 | | | | | | | |--- value: [65.69] | | | | | | |--- AT > 22.49 | | | | | | | |--- value: [45.74] | | | | | |--- TEY > 103.75 | | | | | | |--- TEY <= 127.48 | | | | | | | |--- value: [55.44] | | | | | | |--- TEY > 127.48 | | | | | | | |--- value: [52.86] | | | | |--- AFDP > 4.25 | | | | | |--- AFDP <= 4.97 | | | | | | |--- TEY <= 121.69 | | | | | | | |--- value: [64.04] | | | | | | |--- TEY > 121.69 | | | | | | | |--- value: [58.09] | | | | | |--- AFDP > 4.97 | | | | | | |--- AFDP <= 5.14 | | | | | | | |--- value: [67.76] | | | | | | |--- AFDP > 5.14 | | | | | | | |--- value: [82.86] | | | |--- AT > 22.75 | | | | |--- AFDP <= 4.34 | | | | | |--- TEY <= 130.00 | | | | | | |--- AP <= 1013.35 | | | | | | | |--- value: [50.91] | | | | | | |--- AP > 1013.35 | | | | | | | |--- value: [53.61] | | | | | |--- TEY > 130.00 | | | | | | |--- AT <= 28.02 | | | | | | | |--- value: [54.92] | | | | | | |--- AT > 28.02 | | | | | | | |--- value: [58.59] | | | | |--- AFDP > 4.34 | | | | | |--- AP <= 1015.20 | | | | | | |--- AFDP <= 4.74 | | | | | | | |--- value: [56.41] | | | | | | |--- AFDP > 4.74 | | | | | | | |--- value: [61.15] | | | | | |--- AP > 1015.20 | | | | | | |--- AT <= 24.31 | | | | | | | |--- value: [56.77] | | | | | | |--- AT > 24.31 | | | | | | | |--- value: [75.10] | |--- TEY > 131.89 | | |--- TEY <= 136.65 | | | |--- AFDP <= 3.45 | | | | |--- AP <= 1019.80 | | | | | |--- AP <= 1003.00 | | | | | | |--- AFDP <= 3.25 | | | | | | | |--- value: [72.68] | | | | | | |--- AFDP > 3.25 | | | | | | | |--- value: [81.19] | | | | | |--- AP > 1003.00 | | | | | | |--- AP <= 1015.95 | | | | | | | |--- value: [69.30] | | | | | | |--- AP > 1015.95 | | | | | | | |--- value: [63.88] | | | | |--- AP > 1019.80 | | | | | |--- AFDP <= 3.31 | | | | | | |--- AT <= 18.05 | | | | | | | |--- value: [82.82] | | | | | | |--- AT > 18.05 | | | | | | | |--- value: [91.66] | | | | | |--- AFDP > 3.31 | | | | | | |--- AT <= 20.69 | | | | | | | |--- value: [67.32] | | | | | | |--- AT > 20.69 | | | | | | | |--- value: [90.61] | | | |--- AFDP > 3.45 | | | | |--- AFDP <= 4.76 | | | | | |--- AP <= 999.62 | | | | | | |--- AFDP <= 4.15 | | | | | | | |--- value: [63.25] | | | | | | |--- AFDP > 4.15 | | | | | | | |--- value: [76.43] | | | | | |--- AP > 999.62 | | | | | | |--- TEY <= 132.22 | | | | | | | |--- value: [58.26] | | | | | | |--- TEY > 132.22 | | | | | | | |--- value: [64.09] | | | | |--- AFDP > 4.76 | | | | | |--- AT <= 24.07 | | | | | | |--- AP <= 1014.35 | | | | | | | |--- value: [70.08] | | | | | | |--- AP > 1014.35 | | | | | | | |--- value: [74.16] | | | | | |--- AT > 24.07 | | | | | | |--- AT <= 29.80 | | | | | | | |--- value: [63.82] | | | | | | |--- AT > 29.80 | | | | | | | |--- value: [68.33] | | |--- TEY > 136.65 | | | |--- AT <= 21.70 | | | | |--- AP <= 1020.65 | | | | | |--- AFDP <= 5.60 | | | | | | |--- AFDP <= 4.18 | | | | | | | |--- value: [64.12] | | | | | | |--- AFDP > 4.18 | | | | | | | |--- value: [59.09] | | | | | |--- AFDP > 5.60 | | | | | | |--- TEY <= 152.04 | | | | | | | |--- value: [71.03] | | | | | | |--- TEY > 152.04 | | | | | | | |--- value: [67.11] | | | | |--- AP > 1020.65 | | | | | |--- AFDP <= 4.18 | | | | | | |--- TEY <= 151.01 | | | | | | | |--- value: [97.00] | | | | | | |--- TEY > 151.01 | | | | | | | |--- value: [76.43] | | | | | |--- AFDP > 4.18 | | | | | | |--- TEY <= 150.69 | | | | | | | |--- value: [70.50] | | | | | | |--- TEY > 150.69 | | | | | | | |--- value: [56.02] | | | |--- AT > 21.70 | | | | |--- AFDP <= 5.60 | | | | | |--- AP <= 1019.05 | | | | | | |--- TEY <= 143.73 | | | | | | | |--- value: [59.74] | | | | | | |--- TEY > 143.73 | | | | | | | |--- value: [55.51] | | | | | |--- AP > 1019.05 | | | | | | |--- AFDP <= 4.11 | | | | | | | |--- value: [89.38] | | | | | | |--- AFDP > 4.11 | | | | | | | |--- value: [65.24] | | | | |--- AFDP > 5.60 | | | | | |--- AP <= 1014.35 | | | | | | |--- AT <= 25.35 | | | | | | | |--- value: [67.08] | | | | | | |--- AT > 25.35 | | | | | | | |--- value: [59.91] | | | | | |--- AP > 1014.35 | | | | | | |--- AFDP <= 5.82 | | | | | | | |--- value: [58.17] | | | | | | |--- AFDP > 5.82 | | | | | | | |--- value: [72.44]
In [3]:
from src.rules import get_rules
rules = get_rules(model, features)
display(len(rules))
rules
126
Out[3]:
[if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP <= 4.251) and (TEY <= 103.75) and (AT > 22.491) -> 45.744, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP > 1028.65) and (AFDP > 4.31) and (AFDP <= 4.999) -> 50.781, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP <= 1004.5) -> 65.69, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP > 1004.5) -> 84.697, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP > 3.081) and (AT <= 6.44) and (AP <= 1027.6) -> 105.703, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP > 3.081) and (AT <= 6.44) and (AP > 1027.6) -> 94.802, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP > 3.081) and (AT > 6.44) and (AP <= 1022.35) -> 92.554, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP > 3.081) and (AT > 6.44) and (AP > 1022.35) -> 104.667, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY <= 105.73) and (AP <= 1019.95) and (AFDP <= 3.304) -> 100.502, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY <= 105.73) and (AP <= 1019.95) and (AFDP > 3.304) -> 118.67, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY <= 105.73) and (AP > 1019.95) and (AT <= 9.768) -> 109.956, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY <= 105.73) and (AP > 1019.95) and (AT > 9.768) -> 115.858, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY > 105.73) and (TEY <= 112.785) and (AFDP <= 3.07) -> 86.027, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY > 105.73) and (TEY <= 112.785) and (AFDP > 3.07) -> 92.86, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY > 105.73) and (TEY > 112.785) and (AT <= 8.934) -> 87.682, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT > 7.752) and (TEY > 105.73) and (TEY > 112.785) and (AT > 8.934) -> 75.774, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP <= 3.107) and (AP <= 1017.55) and (AP <= 1009.2) -> 76.472, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP <= 3.107) and (AP <= 1017.55) and (AP > 1009.2) -> 85.342, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP <= 3.107) and (AP > 1017.55) and (AT <= 13.467) -> 99.921, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP <= 3.107) and (AP > 1017.55) and (AT > 13.467) -> 89.167, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP > 3.107) and (AFDP <= 3.427) and (AT <= 15.977) -> 112.884, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP > 3.107) and (AFDP <= 3.427) and (AT > 15.977) -> 90.334, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP > 3.107) and (AFDP > 3.427) and (AP <= 1019.55) -> 94.654, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY <= 105.88) and (AFDP > 3.107) and (AFDP > 3.427) and (AP > 1019.55) -> 75.199, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT <= 14.178) and (AT <= 12.964) and (AFDP <= 3.276) -> 77.011, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT <= 14.178) and (AT <= 12.964) and (AFDP > 3.276) -> 81.372, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT <= 14.178) and (AT > 12.964) and (AFDP <= 3.181) -> 71.136, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT <= 14.178) and (AT > 12.964) and (AFDP > 3.181) -> 77.019, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT > 14.178) and (AFDP <= 3.225) and (AFDP <= 2.637) -> 69.023, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT > 14.178) and (AFDP <= 3.225) and (AFDP > 2.637) -> 63.935, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT > 14.178) and (AFDP > 3.225) and (AT <= 15.626) -> 73.26, if (AT <= 16.958) and (TEY <= 118.405) and (AT > 10.837) and (TEY > 105.88) and (AT > 14.178) and (AFDP > 3.225) and (AT > 15.626) -> 68.002, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP <= 3.694) and (AFDP <= 3.077) and (AT <= 7.324) -> 81.582, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP <= 3.694) and (AFDP <= 3.077) and (AT > 7.324) -> 75.621, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP <= 3.694) and (AFDP > 3.077) and (AT <= 7.404) -> 72.624, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP <= 3.694) and (AFDP > 3.077) and (AT > 7.404) -> 68.878, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP > 3.694) and (TEY <= 140.105) and (TEY <= 129.48) -> 88.915, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP > 3.694) and (TEY <= 140.105) and (TEY > 129.48) -> 80.231, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP > 3.694) and (TEY > 140.105) and (AP <= 1026.9) -> 75.408, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT <= 10.438) and (AFDP > 3.694) and (TEY > 140.105) and (AP > 1026.9) -> 65.576, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP <= 3.846) and (AFDP <= 3.223) and (AP <= 1011.45) -> 72.391, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP <= 3.846) and (AFDP <= 3.223) and (AP > 1011.45) -> 67.358, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP <= 3.846) and (AFDP > 3.223) and (TEY <= 132.02) -> 60.585, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP <= 3.846) and (AFDP > 3.223) and (TEY > 132.02) -> 65.977, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP > 3.846) and (AT <= 13.809) and (TEY <= 134.82) -> 74.765, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP > 3.846) and (AT <= 13.809) and (TEY > 134.82) -> 72.188, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP > 3.846) and (AT > 13.809) and (TEY <= 131.55) -> 65.916, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AT > 10.438) and (AFDP > 3.846) and (AT > 13.809) and (TEY > 131.55) -> 70.244, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP <= 4.022) and (AP <= 1010.05) and (AT <= 14.497) -> 66.765, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP <= 4.022) and (AP <= 1010.05) and (AT > 14.497) -> 72.379, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP <= 4.022) and (AP > 1010.05) and (AT <= 14.172) -> 62.562, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP <= 4.022) and (AP > 1010.05) and (AT > 14.172) -> 57.232, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP > 4.022) and (AP <= 1003.35) and (TEY <= 161.49) -> 71.066, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP > 4.022) and (AP <= 1003.35) and (TEY > 161.49) -> 77.453, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP > 4.022) and (AP > 1003.35) and (AT <= 12.797) -> 67.79, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP <= 1021.95) and (AFDP > 4.022) and (AP > 1003.35) and (AT > 12.797) -> 66.014, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) and (AFDP <= 4.464) -> 62.992, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) and (AFDP > 4.464) -> 55.182, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) and (AFDP <= 4.678) -> 80.146, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) and (AFDP > 4.678) -> 64.14, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP > 1028.65) and (AFDP <= 4.31) and (AT <= 7.169) -> 59.322, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP > 1028.65) and (AFDP <= 4.31) and (AT > 7.169) -> 68.586, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP <= 3.081) and (AFDP <= 2.684) and (AFDP > 2.544) -> 93.814, if (AT <= 16.958) and (TEY > 118.405) and (TEY > 154.69) and (AP > 1021.95) and (AP > 1028.65) and (AFDP > 4.31) and (AFDP > 4.999) -> 60.608, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP <= 2.245) and (AT <= 17.352) -> 110.76, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP <= 2.245) and (AT > 17.352) -> 115.68, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP > 2.245) and (AFDP <= 2.65) and (TEY <= 100.905) -> 79.894, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP > 2.245) and (AFDP <= 2.65) and (TEY > 100.905) -> 64.112, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP > 2.245) and (AFDP > 2.65) and (AT <= 19.339) -> 82.01, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY <= 106.33) and (AFDP > 2.245) and (AFDP > 2.65) and (AT > 19.339) -> 72.418, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP <= 3.911) and (TEY <= 127.095) and (AT <= 18.319) -> 62.177, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP <= 3.911) and (TEY <= 127.095) and (AT > 18.319) -> 58.251, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP <= 3.911) and (TEY > 127.095) and (AFDP <= 3.235) -> 75.858, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP <= 3.911) and (TEY > 127.095) and (AFDP > 3.235) -> 53.854, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP > 3.911) and (TEY <= 116.94) and (AFDP <= 4.411) -> 69.744, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP > 3.911) and (TEY <= 116.94) and (AFDP > 4.411) -> 64.687, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP > 3.911) and (TEY > 116.94) and (AFDP <= 4.543) -> 59.585, if (AT > 16.958) and (TEY <= 131.885) and (AT <= 20.418) and (TEY > 106.33) and (AFDP > 3.911) and (TEY > 116.94) and (AFDP > 4.543) -> 68.111, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP <= 4.251) and (TEY <= 103.75) and (AT <= 22.491) -> 65.687, if (AT <= 16.958) and (TEY <= 118.405) and (AT <= 10.837) and (AT <= 7.752) and (AFDP <= 3.081) and (AFDP <= 2.684) and (AFDP <= 2.544) -> 102.293, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP <= 4.251) and (TEY > 103.75) and (TEY <= 127.485) -> 55.441, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP <= 4.251) and (TEY > 103.75) and (TEY > 127.485) -> 52.864, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP > 4.251) and (AFDP <= 4.966) and (TEY <= 121.69) -> 64.037, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP > 4.251) and (AFDP <= 4.966) and (TEY > 121.69) -> 58.089, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP > 4.251) and (AFDP > 4.966) and (AFDP <= 5.136) -> 67.764, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT <= 22.746) and (AFDP > 4.251) and (AFDP > 4.966) and (AFDP > 5.136) -> 82.857, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP <= 4.344) and (TEY <= 129.995) and (AP <= 1013.35) -> 50.906, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP <= 4.344) and (TEY <= 129.995) and (AP > 1013.35) -> 53.606, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP <= 4.344) and (TEY > 129.995) and (AT <= 28.021) -> 54.921, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP <= 4.344) and (TEY > 129.995) and (AT > 28.021) -> 58.587, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP > 4.344) and (AP <= 1015.2) and (AFDP <= 4.739) -> 56.411, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP > 4.344) and (AP <= 1015.2) and (AFDP > 4.739) -> 61.151, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP > 4.344) and (AP > 1015.2) and (AT <= 24.312) -> 56.769, if (AT > 16.958) and (TEY <= 131.885) and (AT > 20.418) and (AT > 22.746) and (AFDP > 4.344) and (AP > 1015.2) and (AT > 24.312) -> 75.097, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP <= 1003.0) and (AFDP <= 3.245) -> 72.684, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP <= 1003.0) and (AFDP > 3.245) -> 81.186, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP > 1003.0) and (AP <= 1015.95) -> 69.3, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP > 1003.0) and (AP > 1015.95) -> 63.882, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) and (AFDP <= 3.309) and (AT <= 18.052) -> 82.823, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) and (AFDP <= 3.309) and (AT > 18.052) -> 91.663, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) and (AFDP > 3.309) and (AT <= 20.688) -> 67.318, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) and (AFDP > 3.309) and (AT > 20.688) -> 90.607, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP <= 999.625) and (AFDP <= 4.154) -> 63.255, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP <= 999.625) and (AFDP > 4.154) -> 76.434, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP > 999.625) and (TEY <= 132.215) -> 58.258, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP > 999.625) and (TEY > 132.215) -> 64.093, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP > 4.756) and (AT <= 24.071) and (AP <= 1014.35) -> 70.079, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP > 4.756) and (AT <= 24.071) and (AP > 1014.35) -> 74.157, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP > 4.756) and (AT > 24.071) and (AT <= 29.795) -> 63.817, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP > 4.756) and (AT > 24.071) and (AT > 29.795) -> 68.328, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP <= 1020.65) and (AFDP <= 5.596) and (AFDP <= 4.179) -> 64.124, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP <= 1020.65) and (AFDP <= 5.596) and (AFDP > 4.179) -> 59.091, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP <= 1020.65) and (AFDP > 5.596) and (TEY <= 152.045) -> 71.027, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP <= 1020.65) and (AFDP > 5.596) and (TEY > 152.045) -> 67.105, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP > 1020.65) and (AFDP <= 4.18) and (TEY <= 151.015) -> 97.001, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP > 1020.65) and (AFDP <= 4.18) and (TEY > 151.015) -> 76.428, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP > 1020.65) and (AFDP > 4.18) and (TEY <= 150.695) -> 70.498, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT <= 21.703) and (AP > 1020.65) and (AFDP > 4.18) and (TEY > 150.695) -> 56.017, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP <= 5.597) and (AP <= 1019.05) and (TEY <= 143.725) -> 59.741, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP <= 5.597) and (AP <= 1019.05) and (TEY > 143.725) -> 55.512, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP <= 5.597) and (AP > 1019.05) and (AFDP <= 4.114) -> 89.381, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP <= 5.597) and (AP > 1019.05) and (AFDP > 4.114) -> 65.239, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP > 5.597) and (AP <= 1014.35) and (AT <= 25.345) -> 67.084, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP > 5.597) and (AP <= 1014.35) and (AT > 25.345) -> 59.906, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP > 5.597) and (AP > 1014.35) and (AFDP <= 5.819) -> 58.17, if (AT > 16.958) and (TEY > 131.885) and (TEY > 136.645) and (AT > 21.703) and (AFDP > 5.597) and (AP > 1014.35) and (AFDP > 5.819) -> 72.443]
In [4]:
from src.rules import normalise_rules
rules = normalise_rules(rules)
display(len(rules))
rules
126
Out[4]:
[if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP <= 4.251) -> 45.744, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP > 4.31) and (AFDP <= 4.999) -> 50.781, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP <= 1004.5) -> 65.69, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP > 1004.5) -> 84.697, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP > 3.081) and (AP <= 1027.6) -> 105.703, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP > 3.081) and (AP > 1027.6) -> 94.802, if (AT <= 16.958) and (AT > 6.44) and (TEY <= 118.405) and (AFDP > 3.081) and (AP <= 1022.35) -> 92.554, if (AT <= 16.958) and (AT > 6.44) and (TEY <= 118.405) and (AFDP > 3.081) and (AP > 1022.35) -> 104.667, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP <= 1019.95) and (AFDP <= 3.304) -> 100.502, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP <= 1019.95) and (AFDP > 3.304) -> 118.67, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP > 1019.95) -> 109.956, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP > 1019.95) -> 115.858, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) and (AFDP <= 3.07) -> 86.027, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) and (AFDP > 3.07) -> 92.86, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) -> 87.682, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) -> 75.774, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP <= 1017.55) -> 76.472, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP <= 1017.55) and (AP > 1009.2) -> 85.342, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP > 1017.55) -> 99.921, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP > 1017.55) -> 89.167, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AFDP <= 3.427) -> 112.884, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AFDP <= 3.427) -> 90.334, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AP <= 1019.55) -> 94.654, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AP > 1019.55) -> 75.199, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.276) -> 77.011, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.276) -> 81.372, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.181) -> 71.136, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.181) -> 77.019, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.225) -> 69.023, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.225) and (AFDP > 2.637) -> 63.935, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.225) -> 73.26, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.225) -> 68.002, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) -> 81.582, if (AT <= 16.958) and (AT > 7.324) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) -> 75.621, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) and (AFDP > 3.077) -> 72.624, if (AT <= 16.958) and (AT > 7.404) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) and (AFDP > 3.077) -> 68.878, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) -> 88.915, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) -> 80.231, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) and (AP <= 1026.9) -> 75.408, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) and (AP > 1026.9) -> 65.576, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AP <= 1011.45) -> 72.391, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AP > 1011.45) -> 67.358, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AFDP > 3.223) -> 60.585, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AFDP > 3.223) -> 65.977, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.846) -> 74.765, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.846) -> 72.188, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.846) -> 65.916, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.846) -> 70.244, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP <= 4.022) -> 66.765, if (AT <= 16.958) and (AT > 14.497) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP <= 4.022) -> 72.379, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1010.05) and (AFDP <= 4.022) -> 62.562, if (AT <= 16.958) and (AT > 14.172) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1010.05) and (AFDP <= 4.022) -> 57.232, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 161.49) and (AP <= 1021.95) and (AFDP > 4.022) -> 71.066, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP > 4.022) -> 77.453, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1003.35) and (AFDP > 4.022) -> 67.79, if (AT <= 16.958) and (AT > 12.797) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1003.35) and (AFDP > 4.022) -> 66.014, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) -> 62.992, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) and (AFDP > 4.464) -> 55.182, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) and (AFDP <= 4.678) -> 80.146, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) -> 64.14, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP <= 4.31) -> 59.322, if (AT <= 16.958) and (AT > 7.169) and (TEY > 118.405) and (AP > 1021.95) and (AFDP <= 4.31) -> 68.586, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.544) -> 93.814, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP > 4.31) -> 60.608, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP <= 2.245) -> 110.76, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP <= 2.245) -> 115.68, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP > 2.245) and (AFDP <= 2.65) -> 79.894, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 100.905) and (AFDP > 2.245) and (AFDP <= 2.65) -> 64.112, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP > 2.245) -> 82.01, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP > 2.245) -> 72.418, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) -> 62.177, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) -> 58.251, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) -> 75.858, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) and (AFDP > 3.235) -> 53.854, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) and (AFDP <= 4.411) -> 69.744, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) -> 64.687, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) and (AFDP <= 4.543) -> 59.585, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) -> 68.111, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP <= 4.251) -> 65.687, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) -> 102.293, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (TEY > 103.75) and (AFDP <= 4.251) -> 55.441, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (TEY > 103.75) and (AFDP <= 4.251) -> 52.864, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) and (AFDP <= 4.966) -> 64.037, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (TEY > 121.69) and (AFDP > 4.251) and (AFDP <= 4.966) -> 58.089, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) and (AFDP <= 5.136) -> 67.764, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) -> 82.857, if (AT > 16.958) and (TEY <= 131.885) and (AFDP <= 4.344) and (AP <= 1013.35) -> 50.906, if (AT > 16.958) and (TEY <= 131.885) and (AFDP <= 4.344) and (AP > 1013.35) -> 53.606, if (AT > 16.958) and (AT <= 28.021) and (TEY <= 131.885) and (TEY > 129.995) and (AFDP <= 4.344) -> 54.921, if (AT > 16.958) and (TEY <= 131.885) and (TEY > 129.995) and (AFDP <= 4.344) -> 58.587, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AFDP <= 4.739) and (AP <= 1015.2) -> 56.411, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AP <= 1015.2) -> 61.151, if (AT > 16.958) and (AT <= 24.312) and (TEY <= 131.885) and (AFDP > 4.344) and (AP > 1015.2) -> 56.769, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AP > 1015.2) -> 75.097, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) -> 72.684, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.245) and (AP <= 1019.8) -> 81.186, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP > 1003.0) -> 69.3, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP > 1003.0) -> 63.882, if (AT > 16.958) and (AT <= 18.052) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) -> 82.823, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) -> 91.663, if (AT > 16.958) and (AT <= 20.688) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.309) and (AP > 1019.8) -> 67.318, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.309) and (AP > 1019.8) -> 90.607, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP <= 999.625) -> 63.255, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP <= 999.625) -> 76.434, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP > 999.625) -> 58.258, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP > 999.625) -> 64.093, if (AT > 16.958) and (AT <= 24.071) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AP <= 1014.35) -> 70.079, if (AT > 16.958) and (AT <= 24.071) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AP > 1014.35) -> 74.157, if (AT > 16.958) and (AT <= 29.795) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) -> 63.817, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) -> 68.328, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP <= 5.596) -> 64.124, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP <= 5.596) and (AFDP > 4.179) -> 59.091, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 152.045) and (AP <= 1020.65) and (AFDP > 5.596) -> 71.027, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP > 5.596) -> 67.105, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 151.015) and (AP > 1020.65) and (AFDP <= 4.18) -> 97.001, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP > 1020.65) and (AFDP <= 4.18) -> 76.428, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 150.695) and (AP > 1020.65) and (AFDP > 4.18) -> 70.498, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP > 1020.65) and (AFDP > 4.18) -> 56.017, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 143.725) and (AFDP <= 5.597) and (AP <= 1019.05) -> 59.741, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AP <= 1019.05) -> 55.512, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AP > 1019.05) -> 89.381, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AFDP > 4.114) and (AP > 1019.05) -> 65.239, if (AT > 16.958) and (AT <= 25.345) and (TEY > 131.885) and (AFDP > 5.597) and (AP <= 1014.35) -> 67.084, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AP <= 1014.35) -> 59.906, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AFDP <= 5.819) and (AP > 1014.35) -> 58.17, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AP > 1014.35) -> 72.443]
In [5]:
from src.rules import delete_same_rules
rules = delete_same_rules(rules)
display(len(rules))
rules
106
Out[5]:
[if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP > 4.31) and (AFDP <= 4.999) -> 50.781, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP <= 1004.5) -> 65.69, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.684) and (AP > 1004.5) -> 84.697, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP > 3.081) and (AP <= 1027.6) -> 105.703, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP > 3.081) and (AP > 1027.6) -> 94.802, if (AT <= 16.958) and (AT > 6.44) and (TEY <= 118.405) and (AFDP > 3.081) and (AP <= 1022.35) -> 92.554, if (AT <= 16.958) and (AT > 6.44) and (TEY <= 118.405) and (AFDP > 3.081) and (AP > 1022.35) -> 104.667, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP <= 1019.95) and (AFDP <= 3.304) -> 100.502, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP <= 1019.95) and (AFDP > 3.304) -> 118.67, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (AP > 1019.95) -> 112.907, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) and (AFDP <= 3.07) -> 86.027, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) and (AFDP > 3.07) -> 92.86, if (AT <= 16.958) and (AT > 7.752) and (TEY <= 118.405) and (TEY > 105.73) -> 81.728, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP <= 1017.55) -> 76.472, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP <= 1017.55) and (AP > 1009.2) -> 85.342, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP <= 3.107) and (AP > 1017.55) -> 94.544, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AFDP <= 3.427) -> 101.609, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AP <= 1019.55) -> 94.654, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (AFDP > 3.107) and (AP > 1019.55) -> 75.199, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.276) -> 77.011, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.276) -> 81.372, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.181) -> 71.136, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.181) -> 77.019, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.225) -> 69.023, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP <= 3.225) and (AFDP > 2.637) -> 63.935, if (AT <= 16.958) and (AT > 10.837) and (TEY <= 118.405) and (TEY > 105.88) and (AFDP > 3.225) -> 70.631, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) -> 81.582, if (AT <= 16.958) and (AT > 7.324) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) -> 75.621, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) and (AFDP > 3.077) -> 72.624, if (AT <= 16.958) and (AT > 7.404) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.694) and (AFDP > 3.077) -> 68.878, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) -> 84.573, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) and (AP <= 1026.9) -> 75.408, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.694) and (AP > 1026.9) -> 65.576, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AP <= 1011.45) -> 72.391, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AP > 1011.45) -> 67.358, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP <= 3.846) and (AFDP > 3.223) -> 63.281, if (AT <= 16.958) and (AT > 10.438) and (TEY > 118.405) and (TEY <= 154.69) and (AFDP > 3.846) -> 70.778, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP <= 4.022) -> 66.765, if (AT <= 16.958) and (AT > 14.497) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP <= 4.022) -> 72.379, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1010.05) and (AFDP <= 4.022) -> 62.562, if (AT <= 16.958) and (AT > 14.172) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1010.05) and (AFDP <= 4.022) -> 57.232, if (AT <= 16.958) and (TEY > 118.405) and (TEY <= 161.49) and (AP <= 1021.95) and (AFDP > 4.022) -> 71.066, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AFDP > 4.022) -> 77.453, if (AT <= 16.958) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1003.35) and (AFDP > 4.022) -> 67.79, if (AT <= 16.958) and (AT > 12.797) and (TEY > 118.405) and (AP <= 1021.95) and (AP > 1003.35) and (AFDP > 4.022) -> 66.014, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) -> 62.992, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP <= 4.639) and (AFDP > 4.464) -> 55.182, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) and (AFDP <= 4.678) -> 80.146, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AP <= 1028.65) and (AFDP > 4.639) -> 64.14, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP <= 4.31) -> 59.322, if (AT <= 16.958) and (AT > 7.169) and (TEY > 118.405) and (AP > 1021.95) and (AFDP <= 4.31) -> 68.586, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) and (AFDP > 2.544) -> 93.814, if (AT <= 16.958) and (TEY > 118.405) and (AP > 1021.95) and (AFDP > 4.31) -> 60.608, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP <= 2.245) -> 113.22, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP > 2.245) and (AFDP <= 2.65) -> 79.894, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 100.905) and (AFDP > 2.245) and (AFDP <= 2.65) -> 64.112, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (AFDP > 2.245) -> 77.214, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) -> 65.429, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP <= 3.911) and (AFDP > 3.235) -> 53.854, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) and (AFDP <= 4.411) -> 69.744, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) and (AFDP <= 4.543) -> 59.585, if (AT > 16.958) and (AT <= 20.418) and (TEY <= 131.885) and (TEY > 106.33) and (AFDP > 3.911) -> 66.399, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP <= 4.251) -> 55.716, if (AT <= 16.958) and (TEY <= 118.405) and (AFDP <= 3.081) -> 102.293, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (TEY > 103.75) and (AFDP <= 4.251) -> 54.153, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) and (AFDP <= 4.966) -> 64.037, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (TEY > 121.69) and (AFDP > 4.251) and (AFDP <= 4.966) -> 58.089, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) and (AFDP <= 5.136) -> 67.764, if (AT > 16.958) and (AT <= 22.746) and (TEY <= 131.885) and (AFDP > 4.251) -> 82.857, if (AT > 16.958) and (TEY <= 131.885) and (AFDP <= 4.344) and (AP <= 1013.35) -> 50.906, if (AT > 16.958) and (TEY <= 131.885) and (AFDP <= 4.344) and (AP > 1013.35) -> 53.606, if (AT > 16.958) and (AT <= 28.021) and (TEY <= 131.885) and (TEY > 129.995) and (AFDP <= 4.344) -> 54.921, if (AT > 16.958) and (TEY <= 131.885) and (TEY > 129.995) and (AFDP <= 4.344) -> 58.587, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AFDP <= 4.739) and (AP <= 1015.2) -> 56.411, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AP <= 1015.2) -> 61.151, if (AT > 16.958) and (AT <= 24.312) and (TEY <= 131.885) and (AFDP > 4.344) and (AP > 1015.2) -> 56.769, if (AT > 16.958) and (TEY <= 131.885) and (AFDP > 4.344) and (AP > 1015.2) -> 75.097, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) -> 72.684, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.245) and (AP <= 1019.8) -> 81.186, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP <= 1019.8) and (AP > 1003.0) -> 66.591, if (AT > 16.958) and (AT <= 18.052) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) -> 82.823, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AP > 1019.8) -> 91.663, if (AT > 16.958) and (AT <= 20.688) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.309) and (AP > 1019.8) -> 67.318, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP <= 3.449) and (AFDP > 3.309) and (AP > 1019.8) -> 90.607, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP <= 999.625) -> 69.844, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AFDP <= 4.756) and (AP > 999.625) -> 61.175, if (AT > 16.958) and (AT <= 24.071) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AP <= 1014.35) -> 70.079, if (AT > 16.958) and (AT <= 24.071) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) and (AP > 1014.35) -> 74.157, if (AT > 16.958) and (AT <= 29.795) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) -> 63.817, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 136.645) and (AFDP > 3.449) -> 68.328, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP <= 5.596) -> 64.124, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP <= 5.596) and (AFDP > 4.179) -> 59.091, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 152.045) and (AP <= 1020.65) and (AFDP > 5.596) -> 71.027, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP <= 1020.65) and (AFDP > 5.596) -> 67.105, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 151.015) and (AP > 1020.65) and (AFDP <= 4.18) -> 97.001, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP > 1020.65) and (AFDP <= 4.18) -> 76.428, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (TEY <= 150.695) and (AP > 1020.65) and (AFDP > 4.18) -> 70.498, if (AT > 16.958) and (AT <= 21.703) and (TEY > 131.885) and (AP > 1020.65) and (AFDP > 4.18) -> 56.017, if (AT > 16.958) and (TEY > 131.885) and (TEY <= 143.725) and (AFDP <= 5.597) and (AP <= 1019.05) -> 59.741, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AP <= 1019.05) -> 55.512, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AP > 1019.05) -> 89.381, if (AT > 16.958) and (TEY > 131.885) and (AFDP <= 5.597) and (AFDP > 4.114) and (AP > 1019.05) -> 65.239, if (AT > 16.958) and (AT <= 25.345) and (TEY > 131.885) and (AFDP > 5.597) and (AP <= 1014.35) -> 67.084, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AP <= 1014.35) -> 59.906, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AFDP <= 5.819) and (AP > 1014.35) -> 58.17, if (AT > 16.958) and (TEY > 131.885) and (AFDP > 5.597) and (AP > 1014.35) -> 72.443]
In [6]:
from sklearn.model_selection import train_test_split
random_state = 9
y = data["NOX"]
X = data.drop(["NOX"], axis=1).copy()
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=random_state
)
display(X_train, y_train, X_test, y_test)
AT | AP | AFDP | TEY | |
---|---|---|---|---|
4480 | 26.6350 | 1009.7 | 4.4137 | 147.37 |
24883 | 20.2280 | 1016.2 | 4.6238 | 154.71 |
21557 | 15.6330 | 1018.5 | 4.0899 | 154.26 |
1705 | 16.6540 | 1020.2 | 4.5755 | 132.60 |
21388 | 21.0020 | 1004.3 | 4.1101 | 153.48 |
... | ... | ... | ... | ... |
25725 | 17.5190 | 1015.9 | 3.6809 | 125.22 |
5014 | 21.9780 | 1014.4 | 3.1246 | 110.81 |
22584 | 4.7103 | 1003.0 | 3.2741 | 127.67 |
501 | 6.7758 | 1008.3 | 5.1192 | 166.46 |
20828 | 17.6730 | 1020.7 | 3.0370 | 127.08 |
29386 rows × 4 columns
4480 52.970 24883 58.801 21557 78.066 1705 73.955 21388 79.989 ... 25725 53.424 5014 58.462 22584 65.275 501 65.469 20828 77.008 Name: NOX, Length: 29386, dtype: float64
AT | AP | AFDP | TEY | |
---|---|---|---|---|
18246 | 23.4530 | 1006.2 | 3.7535 | 132.47 |
20343 | 28.7090 | 1011.2 | 6.0321 | 145.91 |
2924 | 21.8330 | 1017.0 | 3.9663 | 139.04 |
117 | 7.8167 | 1022.2 | 4.6605 | 164.73 |
5713 | 19.9120 | 1013.1 | 3.6710 | 126.90 |
... | ... | ... | ... | ... |
21917 | 9.5791 | 1017.5 | 2.9617 | 130.74 |
13099 | 22.6150 | 1012.1 | 4.2739 | 133.44 |
26704 | 28.4020 | 1004.4 | 4.0643 | 123.17 |
4182 | 31.7400 | 1012.2 | 4.5323 | 148.16 |
2982 | 23.7130 | 1013.5 | 3.7112 | 134.75 |
7347 rows × 4 columns
18246 58.948 20343 62.909 2924 61.083 117 66.369 5713 56.675 ... 21917 71.316 13099 63.308 26704 49.210 4182 59.452 2982 66.807 Name: NOX, Length: 7347, dtype: float64
In [7]:
from src.rules import simplify_rules
rules = simplify_rules(X_train, rules)
rules
Out[7]:
[if (AT = -6.235) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 4.654) -> 50.781, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 2.883) and (AP = 985.85) -> 65.69, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 2.883) and (AP = 1036.6) -> 84.697, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 985.85) -> 105.703, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 1036.6) -> 94.802, if (AT = 11.699) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 985.85) -> 92.554, if (AT = 11.699) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 1036.6) -> 104.667, if (AT = 12.355) and (TEY = 100.02) and (AP = 985.85) and (AFDP = 2.099) -> 100.502, if (AT = 12.355) and (TEY = 100.02) and (AP = 985.85) and (AFDP = 7.611) -> 118.67, if (AT = 12.355) and (TEY = 100.02) and (AP = 1036.6) -> 112.907, if (AT = 12.355) and (TEY = 112.068) and (AFDP = 2.099) -> 86.027, if (AT = 12.355) and (TEY = 112.068) and (AFDP = 7.611) -> 92.86, if (AT = 12.355) and (TEY = 112.068) -> 81.728, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 2.099) and (AP = 985.85) -> 76.472, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 2.099) and (AP = 1013.375) -> 85.342, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 2.099) and (AP = 1036.6) -> 94.544, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 3.267) -> 101.609, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 985.85) -> 94.654, if (AT = 13.898) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 1036.6) -> 75.199, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 2.099) -> 77.011, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 7.611) -> 81.372, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 2.099) -> 71.136, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 7.611) -> 77.019, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 2.099) -> 69.023, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 2.931) -> 63.935, if (AT = 13.898) and (TEY = 112.142) and (AFDP = 7.611) -> 70.631, if (AT = -6.235) and (TEY = 136.547) and (AFDP = 2.099) -> 81.582, if (AT = 12.141) and (TEY = 136.547) and (AFDP = 2.099) -> 75.621, if (AT = -6.235) and (TEY = 136.547) and (AFDP = 3.386) -> 72.624, if (AT = 12.181) and (TEY = 136.547) and (AFDP = 3.386) -> 68.878, if (AT = -6.235) and (TEY = 136.547) and (AFDP = 7.611) -> 84.573, if (AT = -6.235) and (TEY = 136.547) and (AFDP = 7.611) and (AP = 985.85) -> 75.408, if (AT = -6.235) and (TEY = 136.547) and (AFDP = 7.611) and (AP = 1036.6) -> 65.576, if (AT = 13.698) and (TEY = 136.547) and (AFDP = 2.099) and (AP = 985.85) -> 72.391, if (AT = 13.698) and (TEY = 136.547) and (AFDP = 2.099) and (AP = 1036.6) -> 67.358, if (AT = 13.698) and (TEY = 136.547) and (AFDP = 3.534) -> 63.281, if (AT = 13.698) and (TEY = 136.547) and (AFDP = 7.611) -> 70.778, if (AT = -6.235) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 2.099) -> 66.765, if (AT = 15.728) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 2.099) -> 72.379, if (AT = -6.235) and (TEY = 179.5) and (AP = 1016.0) and (AFDP = 2.099) -> 62.562, if (AT = 15.565) and (TEY = 179.5) and (AP = 1016.0) and (AFDP = 2.099) -> 57.232, if (AT = -6.235) and (TEY = 139.948) and (AP = 985.85) and (AFDP = 7.611) -> 71.066, if (AT = -6.235) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 7.611) -> 77.453, if (AT = -6.235) and (TEY = 179.5) and (AP = 1012.65) and (AFDP = 7.611) -> 67.79, if (AT = 14.878) and (TEY = 179.5) and (AP = 1012.65) and (AFDP = 7.611) -> 66.014, if (AT = -6.235) and (TEY = 179.5) and (AP = 1025.3) and (AFDP = 2.099) -> 62.992, if (AT = -6.235) and (TEY = 179.5) and (AP = 1025.3) and (AFDP = 4.551) -> 55.182, if (AT = -6.235) and (TEY = 179.5) and (AP = 1025.3) and (AFDP = 4.658) -> 80.146, if (AT = -6.235) and (TEY = 179.5) and (AP = 1025.3) and (AFDP = 7.611) -> 64.14, if (AT = -6.235) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 2.099) -> 59.322, if (AT = 12.064) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 2.099) -> 68.586, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 2.812) -> 93.814, if (AT = -6.235) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 7.611) -> 60.608, if (AT = 18.688) and (TEY = 100.02) and (AFDP = 2.099) -> 113.22, if (AT = 18.688) and (TEY = 100.02) and (AFDP = 2.448) -> 79.894, if (AT = 18.688) and (TEY = 116.395) and (AFDP = 2.448) -> 64.112, if (AT = 18.688) and (TEY = 100.02) and (AFDP = 7.611) -> 77.214, if (AT = 18.688) and (TEY = 119.108) and (AFDP = 2.099) -> 65.429, if (AT = 18.688) and (TEY = 119.108) and (AFDP = 3.573) -> 53.854, if (AT = 18.688) and (TEY = 119.108) and (AFDP = 4.161) -> 69.744, if (AT = 18.688) and (TEY = 119.108) and (AFDP = 4.227) -> 59.585, if (AT = 18.688) and (TEY = 119.108) and (AFDP = 7.611) -> 66.399, if (AT = 19.852) and (TEY = 100.02) and (AFDP = 2.099) -> 55.716, if (AT = -6.235) and (TEY = 100.02) and (AFDP = 2.099) -> 102.293, if (AT = 19.852) and (TEY = 117.818) and (AFDP = 2.099) -> 54.153, if (AT = 19.852) and (TEY = 100.02) and (AFDP = 4.609) -> 64.037, if (AT = 19.852) and (TEY = 126.788) and (AFDP = 4.609) -> 58.089, if (AT = 19.852) and (TEY = 100.02) and (AFDP = 4.694) -> 67.764, if (AT = 19.852) and (TEY = 100.02) and (AFDP = 7.611) -> 82.857, if (AT = 37.103) and (TEY = 100.02) and (AFDP = 2.099) and (AP = 985.85) -> 50.906, if (AT = 37.103) and (TEY = 100.02) and (AFDP = 2.099) and (AP = 1036.6) -> 53.606, if (AT = 22.49) and (TEY = 130.94) and (AFDP = 2.099) -> 54.921, if (AT = 37.103) and (TEY = 130.94) and (AFDP = 2.099) -> 58.587, if (AT = 37.103) and (TEY = 100.02) and (AFDP = 4.541) and (AP = 985.85) -> 56.411, if (AT = 37.103) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 985.85) -> 61.151, if (AT = 20.635) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 1036.6) -> 56.769, if (AT = 37.103) and (TEY = 100.02) and (AFDP = 7.611) and (AP = 1036.6) -> 75.097, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 2.099) and (AP = 985.85) -> 72.684, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 3.347) and (AP = 985.85) -> 81.186, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 2.099) and (AP = 1011.4) -> 66.591, if (AT = 17.505) and (TEY = 134.265) and (AFDP = 2.099) and (AP = 1036.6) -> 82.823, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 2.099) and (AP = 1036.6) -> 91.663, if (AT = 18.823) and (TEY = 134.265) and (AFDP = 3.379) and (AP = 1036.6) -> 67.318, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 3.379) and (AP = 1036.6) -> 90.607, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 4.103) and (AP = 985.85) -> 69.844, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 4.103) and (AP = 1036.6) -> 61.175, if (AT = 20.515) and (TEY = 134.265) and (AFDP = 7.611) and (AP = 985.85) -> 70.079, if (AT = 20.515) and (TEY = 134.265) and (AFDP = 7.611) and (AP = 1036.6) -> 74.157, if (AT = 23.377) and (TEY = 134.265) and (AFDP = 7.611) -> 63.817, if (AT = 37.103) and (TEY = 134.265) and (AFDP = 7.611) -> 68.328, if (AT = 19.331) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 2.099) -> 64.124, if (AT = 19.331) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 4.887) -> 59.091, if (AT = 19.331) and (TEY = 141.965) and (AP = 985.85) and (AFDP = 7.611) -> 71.027, if (AT = 19.331) and (TEY = 179.5) and (AP = 985.85) and (AFDP = 7.611) -> 67.105, if (AT = 19.331) and (TEY = 141.45) and (AP = 1036.6) and (AFDP = 2.099) -> 97.001, if (AT = 19.331) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 2.099) -> 76.428, if (AT = 19.331) and (TEY = 141.29) and (AP = 1036.6) and (AFDP = 7.611) -> 70.498, if (AT = 19.331) and (TEY = 179.5) and (AP = 1036.6) and (AFDP = 7.611) -> 56.017, if (AT = 37.103) and (TEY = 137.805) and (AFDP = 2.099) and (AP = 985.85) -> 59.741, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 2.099) and (AP = 985.85) -> 55.512, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 2.099) and (AP = 1036.6) -> 89.381, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 4.855) and (AP = 1036.6) -> 65.239, if (AT = 21.152) and (TEY = 179.5) and (AFDP = 7.611) and (AP = 985.85) -> 67.084, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 7.611) and (AP = 985.85) -> 59.906, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 5.708) and (AP = 1036.6) -> 58.17, if (AT = 37.103) and (TEY = 179.5) and (AFDP = 7.611) and (AP = 1036.6) -> 72.443]
In [8]:
data.describe().transpose()
Out[8]:
count | mean | std | min | 25% | 50% | 75% | max | |
---|---|---|---|---|---|---|---|---|
AT | 36733.0 | 17.712726 | 7.447451 | -6.2348 | 11.7810 | 17.8010 | 23.6650 | 37.1030 |
AP | 36733.0 | 1013.070165 | 6.463346 | 985.8500 | 1008.8000 | 1012.6000 | 1017.0000 | 1036.6000 |
AFDP | 36733.0 | 3.925518 | 0.773936 | 2.0874 | 3.3556 | 3.9377 | 4.3769 | 7.6106 |
TEY | 36733.0 | 133.506404 | 15.618634 | 100.0200 | 124.4500 | 133.7300 | 144.0800 | 179.5000 |
NOX | 36733.0 | 65.293067 | 11.678357 | 25.9050 | 57.1620 | 63.8490 | 71.5480 | 119.9100 |
In [9]:
import matplotlib.pyplot as plt
data.hist(bins=30, figsize=(10, 10))
plt.show()
In [18]:
import numpy as np
from skfuzzy import control as ctrl
import skfuzzy as fuzz
AT = ctrl.Antecedent(np.arange(-6.2348, 37.103, 0.1), "AT")
AP = ctrl.Antecedent(np.arange(985.85, 1036.6, 0.1), "AP")
# AH = ctrl.Antecedent(np.arange(24.085, 100.2, 0.001), "AH")
AFDP = ctrl.Antecedent(np.arange(2.0874, 7.6106, 0.1), "AFDP")
TEY = ctrl.Antecedent(np.arange(100.02, 179.5, 0.1), "TEY")
# TIT = ctrl.Antecedent(np.arange(1000.8, 1100.9, 0.1), "TIT")
# TAT = ctrl.Antecedent(np.arange(511.04, 550.61, 0.01), "TAT")
NOX = ctrl.Consequent(np.arange(25.905, 119.91, 0.1), "NOX")
AT.automf(3, variable_type="quant")
AT.view()
AP.automf(3, variable_type="quant")
AP.view()
# AH.automf(3, variable_type="quant")
AFDP.automf(3, variable_type="quant")
AFDP.view()
TEY.automf(5, variable_type="quant")
TEY.view()
# TIT.automf(5, variable_type="quant")
# TAT.automf(5, variable_type="quant")
# NOX.automf(names=[str(i) for i in range(1, 16)], variable_type="quant")
NOX.automf(5, variable_type="quant")
NOX.view()
/Users/user/Projects/python/fuzzy-rules-generator/.venv/lib/python3.12/site-packages/skfuzzy/control/fuzzyvariable.py:125: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown fig.show()
In [19]:
from src.rules import get_fuzzy_rules
fuzzy_variables = {
"AT": AT,
"AP": AP,
# "AH": AH,
"AFDP": AFDP,
"TEY": TEY,
# "TIT": TIT,
# "TAT": TAT,
"consequent": NOX,
}
fuzzy_rules = get_fuzzy_rules(rules, fuzzy_variables)
fuzzy_cntrl = ctrl.ControlSystem(fuzzy_rules)
sim = ctrl.ControlSystemSimulation(fuzzy_cntrl, lenient=False)
display(len(fuzzy_rules))
fuzzy_rules
72
Out[19]:
[IF ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[high] THEN NOX[higher] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[lower]) AND AP[high] THEN NOX[higher] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF AT[average] AND TEY[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[average] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[lower]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[low] AND TEY[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[low] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[average]) AND AFDP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[average]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[lower]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[low] AND TEY[lower]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[lower]) AND AFDP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[lower]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[high] AND TEY[average]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[lower]) AND AFDP[average]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[average] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF (AT[high] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[average] AND TEY[higher]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[higher]) AND AFDP[average]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax, IF ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax]
In [20]:
sim.input["AT"] = 4.5878
sim.input["AP"] = 1018.7
sim.input["AFDP"] = 3.5758
sim.input["TEY"] = 134.67
# sim.input["AH"] = 83.675
# sim.input["TIT"] = 1086.2
# sim.input["TAT"] = 549.83
# sim.input["AT"] = 31.6890
# sim.input["AP"] = 1010.9
# sim.input["AFDP"] = 4.1312
# sim.input["TEY"] = 128.03
# sim.input["AT"] = 10.9920
# sim.input["AP"] = 1022.4
# sim.input["AFDP"] = 3.2764
# sim.input["TEY"] = 107.81
sim.compute()
sim.print_state()
display(sim.output["NOX"])
NOX.view(sim=sim)
============= Antecedents ============= Antecedent: AT = 4.5878 - low : 0.5001108545034625 - average : 0.4998891454965375 - high : 0.0 Antecedent: TEY = 134.67 - lower : 0.0 - low : 0.25440806045330117 - average : 0.745591939546699 - high : 0.0 - higher : 0.0 Antecedent: AFDP = 3.5758 - low : 0.4587636363636368 - average : 0.5412363636363632 - high : 0.0 Antecedent: AP = 1018.7 - low : 0.0 - average : 0.7041420118346117 - high : 0.2958579881653883 ======= Rules ======= RULE #0: IF ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #1: IF ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[low] AND TEY[lower]) AND AFDP[low]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #2: IF ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #3: IF ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[low] AND TEY[lower]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #4: IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #5: IF ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AP[low] : 0.0 - AFDP[low] : 0.4587636363636368 ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #6: IF ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[high] THEN NOX[higher] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AP[low] : 0.0 - AFDP[high] : 0.0 ((AT[average] AND TEY[lower]) AND AP[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[higher] : 0.0 RULE #7: IF (AT[average] AND TEY[lower]) AND AP[high] THEN NOX[higher] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AP[high] : 0.2958579881653883 (AT[average] AND TEY[lower]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[higher] : 0.0 RULE #8: IF (AT[average] AND TEY[low]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[low] : 0.4587636363636368 (AT[average] AND TEY[low]) AND AFDP[low] = 0.25440806045330117 Activation (THEN-clause): NOX[high] : 0.25440806045330117 RULE #9: IF (AT[average] AND TEY[low]) AND AFDP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[high] : 0.0 (AT[average] AND TEY[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #10: IF AT[average] AND TEY[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 AT[average] AND TEY[low] = 0.25440806045330117 Activation (THEN-clause): NOX[average] : 0.25440806045330117 RULE #11: IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #12: IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[average] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[average] : 0.7041420118346117 ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[average] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #13: IF ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[average] AND TEY[lower]) AND AFDP[low]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #14: IF (AT[average] AND TEY[lower]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 (AT[average] AND TEY[lower]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #15: IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #16: IF (AT[low] AND TEY[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 (AT[low] AND TEY[average]) AND AFDP[low] = 0.4587636363636368 Activation (THEN-clause): NOX[average] : 0.4587636363636368 RULE #17: IF (AT[average] AND TEY[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 (AT[average] AND TEY[average]) AND AFDP[low] = 0.4587636363636368 Activation (THEN-clause): NOX[average] : 0.4587636363636368 RULE #18: IF (AT[low] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 (AT[low] AND TEY[average]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #19: IF ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #20: IF ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[low] AND TEY[average]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #21: IF ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #22: IF (AT[average] AND TEY[average]) AND AFDP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[average] : 0.5412363636363632 (AT[average] AND TEY[average]) AND AFDP[average] = 0.4998891454965375 Activation (THEN-clause): NOX[average] : 0.4998891454965375 RULE #23: IF ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[low] : 0.0 - AFDP[low] : 0.4587636363636368 ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #24: IF ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[average] : 0.7041420118346117 - AFDP[low] : 0.4587636363636368 ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #25: IF ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[average] : 0.7041420118346117 - AFDP[low] : 0.4587636363636368 ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #26: IF ((AT[low] AND TEY[average]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[average] : 0.745591939546699 - AP[low] : 0.0 - AFDP[high] : 0.0 ((AT[low] AND TEY[average]) AND AP[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #27: IF ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[low] : 0.0 - AFDP[high] : 0.0 ((AT[low] AND TEY[higher]) AND AP[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #28: IF ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[average] : 0.7041420118346117 - AFDP[high] : 0.0 ((AT[low] AND TEY[higher]) AND AP[average]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #29: IF ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[average] : 0.7041420118346117 - AFDP[high] : 0.0 ((AT[average] AND TEY[higher]) AND AP[average]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #30: IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[high] : 0.2958579881653883 - AFDP[low] : 0.4587636363636368 ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #31: IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[high] : 0.2958579881653883 - AFDP[average] : 0.5412363636363632 ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[average] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #32: IF ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[higher] : 0.0 - AP[high] : 0.2958579881653883 - AFDP[high] : 0.0 ((AT[low] AND TEY[higher]) AND AP[high]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #33: IF (AT[average] AND TEY[lower]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 (AT[average] AND TEY[lower]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #34: IF (AT[average] AND TEY[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[average] : 0.5412363636363632 (AT[average] AND TEY[low]) AND AFDP[average] = 0.25440806045330117 Activation (THEN-clause): NOX[low] : 0.25440806045330117 RULE #35: IF (AT[average] AND TEY[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[high] : 0.0 (AT[average] AND TEY[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #36: IF (AT[low] AND TEY[lower]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[low] : 0.5001108545034625 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 (AT[low] AND TEY[lower]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #37: IF (AT[average] AND TEY[low]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[low] : 0.4587636363636368 (AT[average] AND TEY[low]) AND AFDP[low] = 0.25440806045330117 Activation (THEN-clause): NOX[low] : 0.25440806045330117 RULE #38: IF (AT[average] AND TEY[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[low] : 0.25440806045330117 - AFDP[average] : 0.5412363636363632 (AT[average] AND TEY[low]) AND AFDP[average] = 0.25440806045330117 Activation (THEN-clause): NOX[low] : 0.25440806045330117 RULE #39: IF (AT[average] AND TEY[lower]) AND AFDP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[average] : 0.5412363636363632 (AT[average] AND TEY[lower]) AND AFDP[average] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #40: IF (AT[average] AND TEY[lower]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[high] : 0.0 (AT[average] AND TEY[lower]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #41: IF ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #42: IF ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[lower] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[lower]) AND AFDP[low]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #43: IF (AT[high] AND TEY[average]) AND AFDP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 (AT[high] AND TEY[average]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #44: IF ((AT[high] AND TEY[lower]) AND AFDP[average]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[lower] : 0.0 - AFDP[average] : 0.5412363636363632 - AP[low] : 0.0 ((AT[high] AND TEY[lower]) AND AFDP[average]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #45: IF ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #46: IF ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[average] AND TEY[lower]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #47: IF ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[lower] : 0.0 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[lower]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #48: IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #49: IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[average] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 - AP[average] : 0.7041420118346117 ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[average] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #50: IF ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[average] AND TEY[average]) AND AFDP[low]) AND AP[high] = 0.2958579881653883 Activation (THEN-clause): NOX[average] : 0.2958579881653883 RULE #51: IF ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[average]) AND AFDP[low]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #52: IF ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[average] : 0.5412363636363632 - AP[low] : 0.0 ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #53: IF ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[average] : 0.5412363636363632 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[average]) AND AFDP[average]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #54: IF ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #55: IF ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[average] AND TEY[average]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #56: IF (AT[average] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 (AT[average] AND TEY[average]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #57: IF (AT[high] AND TEY[average]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[average] : 0.745591939546699 - AFDP[high] : 0.0 (AT[high] AND TEY[average]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #58: IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[low] : 0.0 - AFDP[low] : 0.4587636363636368 ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #59: IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[average] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[low] : 0.0 - AFDP[average] : 0.5412363636363632 ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[average] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #60: IF ((AT[average] AND TEY[average]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AP[low] : 0.0 - AFDP[high] : 0.0 ((AT[average] AND TEY[average]) AND AP[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #61: IF ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[low] : 0.0 - AFDP[high] : 0.0 ((AT[average] AND TEY[higher]) AND AP[low]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #62: IF ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[low] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AP[high] : 0.2958579881653883 - AFDP[low] : 0.4587636363636368 ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[low] = 0.2958579881653883 Activation (THEN-clause): NOX[high] : 0.2958579881653883 RULE #63: IF ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[high] : 0.2958579881653883 - AFDP[low] : 0.4587636363636368 ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #64: IF ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[average] : 0.745591939546699 - AP[high] : 0.2958579881653883 - AFDP[high] : 0.0 ((AT[average] AND TEY[average]) AND AP[high]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #65: IF ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AP[high] : 0.2958579881653883 - AFDP[high] : 0.0 ((AT[average] AND TEY[higher]) AND AP[high]) AND AFDP[high] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #66: IF ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[higher] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[low] : 0.0 ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #67: IF ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[high] THEN NOX[high] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[higher] : 0.0 - AFDP[low] : 0.4587636363636368 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[higher]) AND AFDP[low]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[high] : 0.0 RULE #68: IF ((AT[average] AND TEY[higher]) AND AFDP[high]) AND AP[low] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[average] : 0.4998891454965375 - TEY[higher] : 0.0 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[average] AND TEY[higher]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 RULE #69: IF ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[low] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[higher] : 0.0 - AFDP[high] : 0.0 - AP[low] : 0.0 ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[low] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #70: IF ((AT[high] AND TEY[higher]) AND AFDP[average]) AND AP[high] THEN NOX[low] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[higher] : 0.0 - AFDP[average] : 0.5412363636363632 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[higher]) AND AFDP[average]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[low] : 0.0 RULE #71: IF ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[high] THEN NOX[average] AND aggregation function : fmin OR aggregation function : fmax Aggregation (IF-clause): - AT[high] : 0.0 - TEY[higher] : 0.0 - AFDP[high] : 0.0 - AP[high] : 0.2958579881653883 ((AT[high] AND TEY[higher]) AND AFDP[high]) AND AP[high] = 0.0 Activation (THEN-clause): NOX[average] : 0.0 ============================== Intermediaries and Conquests ============================== Consequent: NOX = 73.82267305642429 lower: Accumulate using accumulation_max : None low: Accumulate using accumulation_max : 0.25440806045330117 average: Accumulate using accumulation_max : 0.4998891454965375 high: Accumulate using accumulation_max : 0.2958579881653883 higher: Accumulate using accumulation_max : 0.0
np.float64(73.82267305642429)
In [21]:
from sklearn import metrics
import math
def fuzzy_pred(row):
sim.input["AT"] = row["AT"]
sim.input["AP"] = row["AP"]
# sim.input["AH"] = row["AH"]
sim.input["AFDP"] = row["AFDP"]
sim.input["TEY"] = row["TEY"]
# sim.input["TIT"] = row["TIT"]
# sim.input["TAT"] = row["TAT"]
sim.compute()
return sim.output["NOX"]
def rmse(row):
return math.sqrt(metrics.mean_squared_error([row["Real"]], [row["Inferred"]]))
result_train = X_train.copy()
result_train["Real"] = y_train
result_train = result_train[:1000]
result_train["Inferred"] = result_train.apply(fuzzy_pred, axis=1)
result_train["RMSE"] = result_train.apply(rmse, axis=1)
result_train = result_train.round({"RMSE": 3})
result_train
Out[21]:
AT | AP | AFDP | TEY | Real | Inferred | RMSE | |
---|---|---|---|---|---|---|---|
4480 | 26.635 | 1009.7 | 4.4137 | 147.37 | 52.970 | 67.086670 | 14.117 |
24883 | 20.228 | 1016.2 | 4.6238 | 154.71 | 58.801 | 72.905000 | 14.104 |
21557 | 15.633 | 1018.5 | 4.0899 | 154.26 | 78.066 | 84.018438 | 5.952 |
1705 | 16.654 | 1020.2 | 4.5755 | 132.60 | 73.955 | 66.957871 | 6.997 |
21388 | 21.002 | 1004.3 | 4.1101 | 153.48 | 79.989 | 62.212277 | 17.777 |
... | ... | ... | ... | ... | ... | ... | ... |
10954 | 24.943 | 1008.7 | 4.3612 | 134.03 | 58.373 | 70.229758 | 11.857 |
13826 | 21.067 | 1008.6 | 3.7510 | 110.82 | 56.018 | 70.831432 | 14.813 |
11719 | 25.398 | 1011.2 | 4.2003 | 134.57 | 63.884 | 72.264646 | 8.381 |
25984 | 26.971 | 1012.9 | 4.5755 | 142.66 | 50.047 | 71.834282 | 21.787 |
826 | 14.198 | 1017.8 | 5.1631 | 156.30 | 71.731 | 72.905000 | 1.174 |
1000 rows × 7 columns
In [22]:
result_train.sort_values(by="RMSE", ascending=False)[result_train["RMSE"] < 10]
/var/folders/yr/lls0svhd1fl_wljz9zn7kgzh0000gn/T/ipykernel_20346/3258912175.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. result_train.sort_values(by="RMSE", ascending=False)[result_train["RMSE"] < 10]
Out[22]:
AT | AP | AFDP | TEY | Real | Inferred | RMSE | |
---|---|---|---|---|---|---|---|
35869 | 13.8420 | 1016.4 | 2.9790 | 119.38 | 62.926 | 72.911271 | 9.985 |
2788 | 23.7410 | 1013.2 | 4.4428 | 155.66 | 59.277 | 69.254744 | 9.978 |
25009 | 16.0880 | 1013.2 | 3.1244 | 109.36 | 63.783 | 73.758193 | 9.975 |
653 | 4.8703 | 1021.4 | 3.7381 | 134.45 | 85.455 | 75.484136 | 9.971 |
23910 | 9.4240 | 1013.0 | 3.6061 | 134.83 | 62.950 | 72.905000 | 9.955 |
... | ... | ... | ... | ... | ... | ... | ... |
13289 | 14.9210 | 1013.6 | 4.1546 | 134.36 | 72.532 | 72.466529 | 0.065 |
805 | 15.0610 | 1019.6 | 5.1283 | 156.42 | 72.956 | 72.905000 | 0.051 |
29530 | 5.4779 | 1025.5 | 4.1873 | 164.35 | 61.087 | 61.035576 | 0.051 |
30610 | 8.6534 | 1028.3 | 3.0518 | 126.87 | 72.872 | 72.905000 | 0.033 |
1375 | 8.2717 | 1020.1 | 5.5121 | 165.06 | 60.380 | 60.403821 | 0.024 |
493 rows × 7 columns
In [23]:
result_test = X_test.copy()
result_test["Real"] = y_test
# result_test = result_test[:items_count]
result_test["Inferred"] = result_test.apply(fuzzy_pred, axis=1)
result_test["RMSE"] = result_test.apply(rmse, axis=1)
result_test = result_test.round({"RMSE": 3})
result_test
Out[23]:
AT | AP | AFDP | TEY | Real | Inferred | RMSE | |
---|---|---|---|---|---|---|---|
18246 | 23.4530 | 1006.2 | 3.7535 | 132.47 | 58.948 | 72.803707 | 13.856 |
20343 | 28.7090 | 1011.2 | 6.0321 | 145.91 | 62.909 | 72.905000 | 9.996 |
2924 | 21.8330 | 1017.0 | 3.9663 | 139.04 | 61.083 | 71.524689 | 10.442 |
117 | 7.8167 | 1022.2 | 4.6605 | 164.73 | 66.369 | 53.699822 | 12.669 |
5713 | 19.9120 | 1013.1 | 3.6710 | 126.90 | 56.675 | 71.033461 | 14.358 |
... | ... | ... | ... | ... | ... | ... | ... |
21917 | 9.5791 | 1017.5 | 2.9617 | 130.74 | 71.316 | 72.905000 | 1.589 |
13099 | 22.6150 | 1012.1 | 4.2739 | 133.44 | 63.308 | 70.603730 | 7.296 |
26704 | 28.4020 | 1004.4 | 4.0643 | 123.17 | 49.210 | 70.451105 | 21.241 |
4182 | 31.7400 | 1012.2 | 4.5323 | 148.16 | 59.452 | 68.790536 | 9.339 |
2982 | 23.7130 | 1013.5 | 3.7112 | 134.75 | 66.807 | 70.384421 | 3.577 |
7347 rows × 7 columns
In [24]:
result_test.hist(bins=30, figsize=(10, 10))
plt.show()
In [25]:
rmetrics = {}
rmetrics["RMSE_train"] = math.sqrt(
metrics.mean_squared_error(result_train["Real"], result_train["Inferred"])
)
rmetrics["RMSE_test"] = math.sqrt(
metrics.mean_squared_error(result_test["Real"], result_test["Inferred"])
)
rmetrics["RMAE_train"] = math.sqrt(
metrics.mean_absolute_error(result_train["Real"], result_train["Inferred"])
)
rmetrics["RMAE_test"] = math.sqrt(
metrics.mean_absolute_error(result_test["Real"], result_test["Inferred"])
)
rmetrics["MAE_train"] = float(
metrics.mean_absolute_error(result_train["Real"], result_train["Inferred"])
)
rmetrics["MAE_test"] = float(
metrics.mean_absolute_error(result_test["Real"], result_test["Inferred"])
)
rmetrics["R2_train"] = metrics.r2_score(result_train["Real"], result_train["Inferred"])
rmetrics["R2_test"] = metrics.r2_score(result_test["Real"], result_test["Inferred"])
rmetrics
Out[25]:
{'RMSE_train': 12.98734738523384, 'RMSE_test': 13.28470315504043, 'RMAE_train': 3.2974956651470366, 'RMAE_test': 3.3117541879627588, 'MAE_train': 10.873477661663498, 'MAE_test': 10.967715801488872, 'R2_train': -0.28702863717588256, 'R2_test': -0.26174697467774677}