问题
The attributes have been saved in 11 columns in csv file. If the order of columns change, Do Randomforest & RandomTree could give different accuracy in each time?
回答1:
Ordering of the features does not affect any of classifiers I know (except those which are specially designed to do so - like specialistic classifiers for time series and other temporal features), no matter if it is Neural Network, SVM, RandomForest, RandomTree or NaiveBayes - it is just a numerical simplification, as arrays are faster then sets, while "under the hood" they are treated as unordered sets (only with indicies showing from which dimension it comes from).
What can change is the output of the particular classifier each time you run your code due to its probabilistic/stochastic methods of learning. For example - neural networks have random initializations, RandomForests has random subsampling etc.
So answer is suprisingly "yes, it can change after order of columns change", but the reason for this is not the change in order, but fact, that after you do so, the internal random number generator already passed some cycles and will generate different numbers.
来源:https://stackoverflow.com/questions/18854599/randomforest-classification-weka