# What formula does GEE use for calculation of Importance in Random Forest?

I got such values of importance in GEE, using such code

``````var variable_importance = ee.Feature(null, ee.Dictionary(trained.explain()).get('importance'));
``````

What formula does GEE use for calculation it? How I can understand better and interpret this parameter?

It was strange that bands B1 and B9 with the lowest resolution of Sentinel-2 (60 m) have the biggest importance values, especially because ROIs of different classes in these bands have the closest spectral characteristic.

``````importance: Object (20 properties)
B1: 2682.795703225982
B11: 2315.5398199914976
B12: 2185.84515419957
B2: 1969.4475177332397
B3: 1935.6989506713057
B4: 1958.7955232848474
B5: 2332.9632154142287
B6: 2111.0172238346317
B7: 2065.7232825789947
B8: 1715.2832277984007
B8A: 2106.327600990918
B9: 2663.665760951093
EVI: 1698.4509109957194
GCI: 1906.9268330311568
GNDVI: 1886.222022424371
LAI: 1655.6410891039452
NBR: 1927.2979888936623
NDII: 1901.8728648529388
NDVI: 2045.8936411291775
SAVI: 1717.1674506330432
``````

As I recall that one issue with the GEE implementation of Random Forests is that it returns the non-permuted `Decrease in Gini impurity index`, which is quite incorrect to base inference on. One should be using the permuted `Decrease in Accuracy` importance as it stabilizes the inherent stochasticity of the model. I beleive that GEE returns the summed index whereas common Python and R implementations return the mean. See line #126 of the smile source code as additional support of the assertion of the Gini importance implementation. The annotation also explains how importance is derived. For DecreaseAccuracy, it is much the same but, n parameters (mtry) are randomly selected for this evaluation of node error.