I am new to random forests and have tried to implement it in both R and Python. I was following a paper that compared the two and followed their exact steps, however, when I plot the variable importance, the Gini index scaling is different and the variables seem to be different as well. Can someone please explain why the scaling is different, and which software I should base my results upon? If my main concern is variable importance, should I run the random forest through my whole data set, or is it still wise to split my data into a train/test set and retrieve the important variables from the training set? I tried implementing rf using the whole data set just to see if that would give me the same results and I still get different results.
rf <- randomForest(Cell~., data = val, importance = TRUE)
rnd_clf = RandomForestClassifier(n_estimators=500,oob_score=True,criterion='gini') bc_rf = rnd_clf.fit(dat1, bc_Y)