As par of Random Forest example:
Here is some context
val forest = RandomForest.trainClassifier(
trainData, 7, Map(10 -> 4, 11 -> 40), 20,
"auto", "entropy", 30, 300)
This is essentially the equivalent of a Python dictionary
So
Map(10 -> 4, 11 -> 40)
Becomes
categoricalFeaturesInfo={10: 4, 11: 40}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.