Loading...

verticapy.machine_learning.vertica.ensemble.IsolationForest.decision_function#

IsolationForest.decision_function(vdf: str | vDataFrame, X: str | list[str] | None = None, name: str | None = None, inplace: bool = True) vDataFrame#

Returns the anomaly score using the input relation.

Parameters#

vdf: SQLRelation

Object to use for the prediction. You can specify a customized relation if it is enclosed with an alias. For example,``(SELECT 1) x`` is valid, whereas (SELECT 1) and SELECT 1 are invalid.

X: SQLColumns, optional

list of columns used to deploy the models. If empty, the model predictors are used.

name: str, optional

Name of the additional vDataColumn. If empty, a name is generated.

inplace: bool, optional

If True, the prediction is added to the vDataFrame.

Returns#

vDataFrame

the input object.

Examples#

We import verticapy:

import verticapy as vp

For this example, we will use the winequality dataset.

import verticapy.datasets as vpd

data = vpd.load_winequality()
123
fixed_acidity
Numeric(8)
123
volatile_acidity
Numeric(9)
123
citric_acid
Numeric(8)
123
residual_sugar
Numeric(9)
123
chlorides
Float(22)
123
free_sulfur_dioxide
Numeric(9)
123
total_sulfur_dioxide
Numeric(9)
123
density
Float(22)
123
pH
Numeric(8)
123
sulphates
Numeric(8)
123
alcohol
Float(22)
123
quality
Integer
123
good
Integer
Abc
color
Varchar(20)
13.80.310.0211.10.03620.0114.00.992483.750.4412.460white
23.90.2250.44.20.0329.0118.00.9893.570.3612.881white
34.20.170.361.80.02993.0161.00.989993.650.8912.071white
44.20.2150.235.10.04164.0157.00.996883.420.448.030white
54.40.320.394.30.0331.0127.00.989043.460.3612.881white
64.40.460.12.80.02431.0111.00.988163.480.3413.160white
74.40.540.095.10.03852.097.00.990223.410.412.271white
84.50.190.210.950.03389.0159.00.993323.340.428.050white
94.60.4450.01.40.05311.0178.00.994263.790.5510.250white
104.60.520.152.10.0548.065.00.99343.90.5613.140red
114.70.1450.291.00.04235.090.00.99083.760.4911.360white
124.70.3350.141.30.03669.0168.00.992123.470.4610.550white
134.70.4550.181.90.03633.0106.00.987463.210.8314.071white
144.70.60.172.30.05817.0106.00.99323.850.612.960red
154.70.670.091.00.025.09.00.987223.30.3413.650white
164.70.7850.03.40.03623.0134.00.989813.530.9213.860white
174.80.130.321.20.04240.098.00.98983.420.6411.871white
184.80.170.282.90.0322.0111.00.99023.380.3411.371white
194.80.210.2110.20.03717.0112.00.993243.660.4812.271white
204.80.2250.381.20.07447.0130.00.991323.310.410.360white
214.80.260.2310.60.03423.0111.00.992743.460.2811.571white
224.80.290.231.10.04438.0180.00.989243.280.3411.960white
234.80.330.06.50.02834.0163.00.99373.350.619.950white
244.80.340.06.50.02833.0163.00.99393.360.619.960white
254.80.650.121.10.0134.010.00.992463.320.3613.540white
264.90.2350.2711.750.0334.0118.00.99543.070.59.460white
274.90.330.311.20.01639.0150.00.987133.330.5914.081white
284.90.3350.141.30.03669.0168.00.992123.470.4610.466666666666750white
294.90.3350.141.30.03669.0168.00.992123.470.4610.466666666666750white
304.90.3450.341.00.06832.0143.00.991383.240.410.150white
314.90.3450.341.00.06832.0143.00.991383.240.410.150white
324.90.420.02.10.04816.042.00.991543.710.7414.071red
334.90.470.171.90.03560.0148.00.989643.270.3511.560white
345.00.170.561.50.02624.0115.00.99063.480.3910.871white
355.00.20.41.90.01520.098.00.98973.370.5512.0560white
365.00.2350.2711.750.0334.0118.00.99543.070.59.460white
375.00.240.195.00.04317.0101.00.994383.670.5710.050white
385.00.240.212.20.03931.0100.00.990983.690.6211.760white
395.00.240.341.10.03449.0158.00.987743.320.3213.171white
405.00.2550.222.70.04346.0153.00.992383.750.7611.360white
415.00.270.324.50.03258.0178.00.989563.450.3112.671white
425.00.270.324.50.03258.0178.00.989563.450.3112.671white
435.00.270.41.20.07642.0124.00.992043.320.4710.160white
445.00.290.545.70.03554.0155.00.989763.270.3412.981white
455.00.30.333.70.0354.0173.00.98873.360.313.071white
465.00.310.06.40.04643.0166.00.9943.30.639.960white
475.00.330.161.50.04910.097.00.99173.480.4410.760white
485.00.330.161.50.04910.097.00.99173.480.4410.760white
495.00.330.161.50.04910.097.00.99173.480.4410.760white
505.00.330.184.60.03240.0124.00.991143.180.411.060white
515.00.330.2311.80.0323.0158.00.993223.410.6411.860white
525.00.350.257.80.03124.0116.00.992413.390.411.360white
535.00.350.257.80.03124.0116.00.992413.390.411.360white
545.00.380.011.60.04826.060.00.990843.70.7514.060red
555.00.40.54.30.04629.080.00.99023.490.6613.660red
565.00.420.242.00.0619.050.00.99173.720.7414.081red
575.00.440.0418.60.03938.0128.00.99853.370.5710.260white
585.00.4550.181.90.03633.0106.00.987463.210.8314.071white
595.00.550.148.30.03235.0164.00.99183.530.5112.581white
605.00.610.121.30.00965.0100.00.98743.260.3713.550white
615.00.740.01.20.04116.046.00.992584.010.5912.560red
625.01.020.041.40.04541.085.00.99383.750.4810.540red
635.01.040.241.60.0532.096.00.99343.740.6211.550red
645.10.110.321.60.02812.090.00.990083.570.5212.260white
655.10.140.250.70.03915.089.00.99193.220.439.260white
665.10.1650.225.70.04742.0146.00.99343.180.559.960white
675.10.210.281.40.04748.0148.00.991683.50.4910.450white
685.10.230.181.00.05313.099.00.989563.220.3911.550white
695.10.250.361.30.03540.078.00.98913.230.6412.171white
705.10.260.331.10.02746.0113.00.989463.350.4311.471white
715.10.260.346.40.03426.099.00.994493.230.419.260white
725.10.290.288.30.02627.0107.00.993083.360.3711.060white
735.10.290.288.30.02627.0107.00.993083.360.3711.060white
745.10.30.32.30.04840.0150.00.989443.290.4612.260white
755.10.3050.131.750.03617.073.00.993.40.5112.333333333333350white
765.10.310.30.90.03728.0152.00.9923.540.5610.160white
775.10.330.221.60.02718.089.00.98933.510.3812.571white
785.10.330.221.60.02718.089.00.98933.510.3812.571white
795.10.330.221.60.02718.089.00.98933.510.3812.571white
805.10.330.276.70.02244.0129.00.992213.360.3911.071white
815.10.350.266.80.03436.0120.00.991883.380.411.560white
825.10.350.266.80.03436.0120.00.991883.380.411.560white
835.10.350.266.80.03436.0120.00.991883.380.411.560white
845.10.390.211.70.02715.072.00.98943.50.4512.560white
855.10.420.01.80.04418.088.00.991573.680.7313.671red
865.10.420.011.50.01725.0102.00.98943.380.3612.371white
875.10.470.021.30.03418.044.00.99213.90.6212.860red
885.10.510.182.10.04216.0101.00.99243.460.8712.971red
895.10.520.062.70.05230.079.00.99323.320.439.350white
905.10.5850.01.70.04414.086.00.992643.560.9412.971red
915.20.1550.331.60.02813.059.00.989753.30.8411.981white
925.20.1550.331.60.02813.059.00.989753.30.8411.981white
935.20.160.340.80.02926.077.00.991553.250.5110.160white
945.20.170.270.70.0311.068.00.992183.30.419.850white
955.20.1850.221.00.0347.0123.00.992183.550.4410.1560white
965.20.20.273.20.04716.093.00.992353.440.5310.171white
975.20.210.311.70.04817.061.00.989533.240.3712.071white
985.20.220.466.20.06641.0187.00.993623.190.429.7333333333333350white
995.20.240.157.10.04332.0134.00.993783.240.489.960white
1005.20.240.453.80.02721.0128.00.9923.550.4911.281white
Rows: 1-100 | Columns: 14

We import the IsolationForest model:

from verticapy.machine_learning.vertica import IsolationForest

Then we can create the model:

model = IsolationForest(
    n_estimators = 10,
    max_depth = 3,
    nbins = 6,
)

We can now fit the model:

model.fit(data, X = ["density", "sulphates"])

To get the SQL query which uses Vertica functions use below:

model.decision_function(data)
Out[4]: 
None   fixed_acidity    volatile_acidity    citric_acid    residual_sugar   \\
1                3.8                0.31           0.02              11.1   \\
2                3.9               0.225            0.4               4.2   \\
3                4.2                0.17           0.36               1.8   \\
4                4.2               0.215           0.23               5.1   \\
5                4.4                0.32           0.39               4.3   \\
6                4.4                0.46            0.1               2.8   \\
7                4.4                0.54           0.09               5.1   \\
8                4.5                0.19           0.21              0.95   \\
9                4.6               0.445            0.0               1.4   \\
10               4.6                0.52           0.15               2.1   \\
11               4.7               0.145           0.29               1.0   \\
12               4.7               0.335           0.14               1.3   \\
13               4.7               0.455           0.18               1.9   \\
14               4.7                 0.6           0.17               2.3   \\
15               4.7                0.67           0.09               1.0   \\
16               4.7               0.785            0.0               3.4   \\
17               4.8                0.13           0.32               1.2   \\
18               4.8                0.17           0.28               2.9   \\
19               4.8                0.21           0.21              10.2   \\
20               4.8               0.225           0.38               1.2   \\
21               4.8                0.26           0.23              10.6   \\
22               4.8                0.29           0.23               1.1   \\
23               4.8                0.33            0.0               6.5   \\
24               4.8                0.34            0.0               6.5   \\
25               4.8                0.65           0.12               1.1   \\
26               4.9               0.235           0.27             11.75   \\
27               4.9                0.33           0.31               1.2   \\
28               4.9               0.335           0.14               1.3   \\
29               4.9               0.335           0.14               1.3   \\
30               4.9               0.345           0.34               1.0   \\
31               4.9               0.345           0.34               1.0   \\
32               4.9                0.42            0.0               2.1   \\
33               4.9                0.47           0.17               1.9   \\
34               5.0                0.17           0.56               1.5   \\
35               5.0                 0.2            0.4               1.9   \\
36               5.0               0.235           0.27             11.75   \\
37               5.0                0.24           0.19               5.0   \\
38               5.0                0.24           0.21               2.2   \\
39               5.0                0.24           0.34               1.1   \\
40               5.0               0.255           0.22               2.7   \\
41               5.0                0.27           0.32               4.5   \\
42               5.0                0.27           0.32               4.5   \\
43               5.0                0.27            0.4               1.2   \\
44               5.0                0.29           0.54               5.7   \\
45               5.0                 0.3           0.33               3.7   \\
46               5.0                0.31            0.0               6.4   \\
47               5.0                0.33           0.16               1.5   \\
48               5.0                0.33           0.16               1.5   \\
49               5.0                0.33           0.16               1.5   \\
50               5.0                0.33           0.18               4.6   \\
51               5.0                0.33           0.23              11.8   \\
52               5.0                0.35           0.25               7.8   \\
53               5.0                0.35           0.25               7.8   \\
54               5.0                0.38           0.01               1.6   \\
55               5.0                 0.4            0.5               4.3   \\
56               5.0                0.42           0.24               2.0   \\
57               5.0                0.44           0.04              18.6   \\
58               5.0               0.455           0.18               1.9   \\
59               5.0                0.55           0.14               8.3   \\
60               5.0                0.61           0.12               1.3   \\
61               5.0                0.74            0.0               1.2   \\
62               5.0                1.02           0.04               1.4   \\
63               5.0                1.04           0.24               1.6   \\
64               5.1                0.11           0.32               1.6   \\
65               5.1                0.14           0.25               0.7   \\
66               5.1               0.165           0.22               5.7   \\
67               5.1                0.21           0.28               1.4   \\
68               5.1                0.23           0.18               1.0   \\
69               5.1                0.25           0.36               1.3   \\
70               5.1                0.26           0.33               1.1   \\
71               5.1                0.26           0.34               6.4   \\
72               5.1                0.29           0.28               8.3   \\
73               5.1                0.29           0.28               8.3   \\
74               5.1                 0.3            0.3               2.3   \\
75               5.1               0.305           0.13              1.75   \\
76               5.1                0.31            0.3               0.9   \\
77               5.1                0.33           0.22               1.6   \\
78               5.1                0.33           0.22               1.6   \\
79               5.1                0.33           0.22               1.6   \\
80               5.1                0.33           0.27               6.7   \\
81               5.1                0.35           0.26               6.8   \\
82               5.1                0.35           0.26               6.8   \\
83               5.1                0.35           0.26               6.8   \\
84               5.1                0.39           0.21               1.7   \\
85               5.1                0.42            0.0               1.8   \\
86               5.1                0.42           0.01               1.5   \\
87               5.1                0.47           0.02               1.3   \\
88               5.1                0.51           0.18               2.1   \\
89               5.1                0.52           0.06               2.7   \\
90               5.1               0.585            0.0               1.7   \\
91               5.2               0.155           0.33               1.6   \\
92               5.2               0.155           0.33               1.6   \\
93               5.2                0.16           0.34               0.8   \\
94               5.2                0.17           0.27               0.7   \\
95               5.2               0.185           0.22               1.0   \\
96               5.2                 0.2           0.27               3.2   \\
97               5.2                0.21           0.31               1.7   \\
98               5.2                0.22           0.46               6.2   \\
99               5.2                0.24           0.15               7.1   \\
100              5.2                0.24           0.45               3.8   \\
None   chlorides    free_sulfur_dioxide    total_sulfur_dioxide   \\
1          0.036                   20.0                   114.0   \\
2           0.03                   29.0                   118.0   \\
3          0.029                   93.0                   161.0   \\
4          0.041                   64.0                   157.0   \\
5           0.03                   31.0                   127.0   \\
6          0.024                   31.0                   111.0   \\
7          0.038                   52.0                    97.0   \\
8          0.033                   89.0                   159.0   \\
9          0.053                   11.0                   178.0   \\
10         0.054                    8.0                    65.0   \\
11         0.042                   35.0                    90.0   \\
12         0.036                   69.0                   168.0   \\
13         0.036                   33.0                   106.0   \\
14         0.058                   17.0                   106.0   \\
15          0.02                    5.0                     9.0   \\
16         0.036                   23.0                   134.0   \\
17         0.042                   40.0                    98.0   \\
18          0.03                   22.0                   111.0   \\
19         0.037                   17.0                   112.0   \\
20         0.074                   47.0                   130.0   \\
21         0.034                   23.0                   111.0   \\
22         0.044                   38.0                   180.0   \\
23         0.028                   34.0                   163.0   \\
24         0.028                   33.0                   163.0   \\
25         0.013                    4.0                    10.0   \\
26          0.03                   34.0                   118.0   \\
27         0.016                   39.0                   150.0   \\
28         0.036                   69.0                   168.0   \\
29         0.036                   69.0                   168.0   \\
30         0.068                   32.0                   143.0   \\
31         0.068                   32.0                   143.0   \\
32         0.048                   16.0                    42.0   \\
33         0.035                   60.0                   148.0   \\
34         0.026                   24.0                   115.0   \\
35         0.015                   20.0                    98.0   \\
36          0.03                   34.0                   118.0   \\
37         0.043                   17.0                   101.0   \\
38         0.039                   31.0                   100.0   \\
39         0.034                   49.0                   158.0   \\
40         0.043                   46.0                   153.0   \\
41         0.032                   58.0                   178.0   \\
42         0.032                   58.0                   178.0   \\
43         0.076                   42.0                   124.0   \\
44         0.035                   54.0                   155.0   \\
45          0.03                   54.0                   173.0   \\
46         0.046                   43.0                   166.0   \\
47         0.049                   10.0                    97.0   \\
48         0.049                   10.0                    97.0   \\
49         0.049                   10.0                    97.0   \\
50         0.032                   40.0                   124.0   \\
51          0.03                   23.0                   158.0   \\
52         0.031                   24.0                   116.0   \\
53         0.031                   24.0                   116.0   \\
54         0.048                   26.0                    60.0   \\
55         0.046                   29.0                    80.0   \\
56          0.06                   19.0                    50.0   \\
57         0.039                   38.0                   128.0   \\
58         0.036                   33.0                   106.0   \\
59         0.032                   35.0                   164.0   \\
60         0.009                   65.0                   100.0   \\
61         0.041                   16.0                    46.0   \\
62         0.045                   41.0                    85.0   \\
63          0.05                   32.0                    96.0   \\
64         0.028                   12.0                    90.0   \\
65         0.039                   15.0                    89.0   \\
66         0.047                   42.0                   146.0   \\
67         0.047                   48.0                   148.0   \\
68         0.053                   13.0                    99.0   \\
69         0.035                   40.0                    78.0   \\
70         0.027                   46.0                   113.0   \\
71         0.034                   26.0                    99.0   \\
72         0.026                   27.0                   107.0   \\
73         0.026                   27.0                   107.0   \\
74         0.048                   40.0                   150.0   \\
75         0.036                   17.0                    73.0   \\
76         0.037                   28.0                   152.0   \\
77         0.027                   18.0                    89.0   \\
78         0.027                   18.0                    89.0   \\
79         0.027                   18.0                    89.0   \\
80         0.022                   44.0                   129.0   \\
81         0.034                   36.0                   120.0   \\
82         0.034                   36.0                   120.0   \\
83         0.034                   36.0                   120.0   \\
84         0.027                   15.0                    72.0   \\
85         0.044                   18.0                    88.0   \\
86         0.017                   25.0                   102.0   \\
87         0.034                   18.0                    44.0   \\
88         0.042                   16.0                   101.0   \\
89         0.052                   30.0                    79.0   \\
90         0.044                   14.0                    86.0   \\
91         0.028                   13.0                    59.0   \\
92         0.028                   13.0                    59.0   \\
93         0.029                   26.0                    77.0   \\
94          0.03                   11.0                    68.0   \\
95          0.03                   47.0                   123.0   \\
96         0.047                   16.0                    93.0   \\
97         0.048                   17.0                    61.0   \\
98         0.066                   41.0                   187.0   \\
99         0.043                   32.0                   134.0   \\
100        0.027                   21.0                   128.0   \\
None   density      pH    sulphates             alcohol    quality   \\
1      0.99248    3.75         0.44                12.4          6   \\
2        0.989    3.57         0.36                12.8          8   \\
3      0.98999    3.65         0.89                12.0          7   \\
4      0.99688    3.42         0.44                 8.0          3   \\
5      0.98904    3.46         0.36                12.8          8   \\
6      0.98816    3.48         0.34                13.1          6   \\
7      0.99022    3.41          0.4                12.2          7   \\
8      0.99332    3.34         0.42                 8.0          5   \\
9      0.99426    3.79         0.55                10.2          5   \\
10      0.9934     3.9         0.56                13.1          4   \\
11      0.9908    3.76         0.49                11.3          6   \\
12     0.99212    3.47         0.46                10.5          5   \\
13     0.98746    3.21         0.83                14.0          7   \\
14      0.9932    3.85          0.6                12.9          6   \\
15     0.98722     3.3         0.34                13.6          5   \\
16     0.98981    3.53         0.92                13.8          6   \\
17      0.9898    3.42         0.64                11.8          7   \\
18      0.9902    3.38         0.34                11.3          7   \\
19     0.99324    3.66         0.48                12.2          7   \\
20     0.99132    3.31          0.4                10.3          6   \\
21     0.99274    3.46         0.28                11.5          7   \\
22     0.98924    3.28         0.34                11.9          6   \\
23      0.9937    3.35         0.61                 9.9          5   \\
24      0.9939    3.36         0.61                 9.9          6   \\
25     0.99246    3.32         0.36                13.5          4   \\
26      0.9954    3.07          0.5                 9.4          6   \\
27     0.98713    3.33         0.59                14.0          8   \\
28     0.99212    3.47         0.46    10.4666666666667          5   \\
29     0.99212    3.47         0.46    10.4666666666667          5   \\
30     0.99138    3.24          0.4                10.1          5   \\
31     0.99138    3.24          0.4                10.1          5   \\
32     0.99154    3.71         0.74                14.0          7   \\
33     0.98964    3.27         0.35                11.5          6   \\
34      0.9906    3.48         0.39                10.8          7   \\
35      0.9897    3.37         0.55               12.05          6   \\
36      0.9954    3.07          0.5                 9.4          6   \\
37     0.99438    3.67         0.57                10.0          5   \\
38     0.99098    3.69         0.62                11.7          6   \\
39     0.98774    3.32         0.32                13.1          7   \\
40     0.99238    3.75         0.76                11.3          6   \\
41     0.98956    3.45         0.31                12.6          7   \\
42     0.98956    3.45         0.31                12.6          7   \\
43     0.99204    3.32         0.47                10.1          6   \\
44     0.98976    3.27         0.34                12.9          8   \\
45      0.9887    3.36          0.3                13.0          7   \\
46       0.994     3.3         0.63                 9.9          6   \\
47      0.9917    3.48         0.44                10.7          6   \\
48      0.9917    3.48         0.44                10.7          6   \\
49      0.9917    3.48         0.44                10.7          6   \\
50     0.99114    3.18          0.4                11.0          6   \\
51     0.99322    3.41         0.64                11.8          6   \\
52     0.99241    3.39          0.4                11.3          6   \\
53     0.99241    3.39          0.4                11.3          6   \\
54     0.99084     3.7         0.75                14.0          6   \\
55      0.9902    3.49         0.66                13.6          6   \\
56      0.9917    3.72         0.74                14.0          8   \\
57      0.9985    3.37         0.57                10.2          6   \\
58     0.98746    3.21         0.83                14.0          7   \\
59      0.9918    3.53         0.51                12.5          8   \\
60      0.9874    3.26         0.37                13.5          5   \\
61     0.99258    4.01         0.59                12.5          6   \\
62      0.9938    3.75         0.48                10.5          4   \\
63      0.9934    3.74         0.62                11.5          5   \\
64     0.99008    3.57         0.52                12.2          6   \\
65      0.9919    3.22         0.43                 9.2          6   \\
66      0.9934    3.18         0.55                 9.9          6   \\
67     0.99168     3.5         0.49                10.4          5   \\
68     0.98956    3.22         0.39                11.5          5   \\
69      0.9891    3.23         0.64                12.1          7   \\
70     0.98946    3.35         0.43                11.4          7   \\
71     0.99449    3.23         0.41                 9.2          6   \\
72     0.99308    3.36         0.37                11.0          6   \\
73     0.99308    3.36         0.37                11.0          6   \\
74     0.98944    3.29         0.46                12.2          6   \\
75        0.99     3.4         0.51    12.3333333333333          5   \\
76       0.992    3.54         0.56                10.1          6   \\
77      0.9893    3.51         0.38                12.5          7   \\
78      0.9893    3.51         0.38                12.5          7   \\
79      0.9893    3.51         0.38                12.5          7   \\
80     0.99221    3.36         0.39                11.0          7   \\
81     0.99188    3.38          0.4                11.5          6   \\
82     0.99188    3.38          0.4                11.5          6   \\
83     0.99188    3.38          0.4                11.5          6   \\
84      0.9894     3.5         0.45                12.5          6   \\
85     0.99157    3.68         0.73                13.6          7   \\
86      0.9894    3.38         0.36                12.3          7   \\
87      0.9921     3.9         0.62                12.8          6   \\
88      0.9924    3.46         0.87                12.9          7   \\
89      0.9932    3.32         0.43                 9.3          5   \\
90     0.99264    3.56         0.94                12.9          7   \\
91     0.98975     3.3         0.84                11.9          8   \\
92     0.98975     3.3         0.84                11.9          8   \\
93     0.99155    3.25         0.51                10.1          6   \\
94     0.99218     3.3         0.41                 9.8          5   \\
95     0.99218    3.55         0.44               10.15          6   \\
96     0.99235    3.44         0.53                10.1          7   \\
97     0.98953    3.24         0.37                12.0          7   \\
98     0.99362    3.19         0.42    9.73333333333333          5   \\
99     0.99378    3.24         0.48                 9.9          6   \\
100      0.992    3.55         0.49                11.2          8   \\
None   good    color  isolationforest_public_verticapy_tmp_...  
1         0    white                         0.479932722103834  
2         1    white                         0.479932722103834  
3         1    white                         0.540564858548604  
4         0    white                         0.484554883412372  
5         1    white                         0.479932722103834  
6         0    white                         0.479932722103834  
7         1    white                         0.479932722103834  
8         0    white                         0.479932722103834  
9         0    white                         0.477862056499846  
10        0      red                         0.477862056499846  
11        0    white                         0.479932722103834  
12        0    white                         0.479932722103834  
13        1    white                         0.540564858548604  
14        0      red                         0.477862056499846  
15        0    white                         0.479932722103834  
16        0    white                         0.540564858548604  
17        1    white                         0.477862056499846  
18        1    white                         0.479932722103834  
19        1    white                         0.479932722103834  
20        0    white                         0.479932722103834  
21        1    white                         0.479932722103834  
22        0    white                         0.479932722103834  
23        0    white                         0.477862056499846  
24        0    white                         0.477862056499846  
25        0    white                         0.479932722103834  
26        0    white                         0.479932722103834  
27        1    white                         0.477862056499846  
28        0    white                         0.479932722103834  
29        0    white                         0.479932722103834  
30        0    white                         0.479932722103834  
31        0    white                         0.479932722103834  
32        1      red                         0.477862056499846  
33        0    white                         0.479932722103834  
34        1    white                         0.479932722103834  
35        0    white                         0.477862056499846  
36        0    white                         0.479932722103834  
37        0    white                         0.477862056499846  
38        0    white                         0.477862056499846  
39        1    white                         0.479932722103834  
40        0    white                         0.477862056499846  
41        1    white                         0.479932722103834  
42        1    white                         0.479932722103834  
43        0    white                         0.479932722103834  
44        1    white                         0.479932722103834  
45        1    white                         0.479932722103834  
46        0    white                         0.477862056499846  
47        0    white                         0.479932722103834  
48        0    white                         0.479932722103834  
49        0    white                         0.479932722103834  
50        0    white                         0.479932722103834  
51        0    white                         0.477862056499846  
52        0    white                         0.479932722103834  
53        0    white                         0.479932722103834  
54        0      red                         0.477862056499846  
55        0      red                         0.477862056499846  
56        1      red                         0.477862056499846  
57        0    white                         0.477859854068755  
58        1    white                         0.540564858548604  
59        1    white                         0.479932722103834  
60        0    white                         0.479932722103834  
61        0      red                         0.477862056499846  
62        0      red                         0.479932722103834  
63        0      red                         0.477862056499846  
64        0    white                         0.477862056499846  
65        0    white                         0.479932722103834  
66        0    white                         0.477862056499846  
67        0    white                         0.479932722103834  
68        0    white                         0.479932722103834  
69        1    white                         0.477862056499846  
70        1    white                         0.479932722103834  
71        0    white                         0.479932722103834  
72        0    white                         0.479932722103834  
73        0    white                         0.479932722103834  
74        0    white                         0.479932722103834  
75        0    white                         0.479932722103834  
76        0    white                         0.477862056499846  
77        1    white                         0.479932722103834  
78        1    white                         0.479932722103834  
79        1    white                         0.479932722103834  
80        1    white                         0.479932722103834  
81        0    white                         0.479932722103834  
82        0    white                         0.479932722103834  
83        0    white                         0.479932722103834  
84        0    white                         0.479932722103834  
85        1      red                         0.477862056499846  
86        1    white                         0.479932722103834  
87        0      red                         0.477862056499846  
88        1      red                         0.540564858548604  
89        0    white                         0.479932722103834  
90        1      red                         0.540564858548604  
91        1    white                         0.540564858548604  
92        1    white                         0.540564858548604  
93        0    white                         0.479932722103834  
94        0    white                         0.479932722103834  
95        0    white                         0.479932722103834  
96        1    white                         0.477862056499846  
97        1    white                         0.479932722103834  
98        0    white                         0.479932722103834  
99        0    white                         0.479932722103834  
100       1    white                         0.479932722103834  
Rows: 1-100 | Columns: 15

Note

Refer to IsolationForest for more information about the different methods and usages.