July 2017
Beginner to intermediate
715 pages
17h 3m
English
Finally, we can also see which features contribute most to the model, which are less important, and order our features according to their performance. XGBoost implements one such feature's important measure called FScore, which is the number of times a feature is used by the model.
To extract FScore, we first need to create a feature map: a file that contains the names of the features:
List<String> featureNames = columnNames(dataframe);String fmap = "feature_map.fmap";try (PrintWriter printWriter = new PrintWriter(fileName)) { for (int i = 0; i < featureNames.size(); i++) { printWriter.print(i); printWriter.print('t'); printWriter.print(featureNames.get(i)); printWriter.print('t'); printWriter.print("q"); printWriter.println(); ...