我使用基於here的randomforest代碼。 這(跳過來看看到底問題): # Select the best split point for a dataset
def get_split(dataset, n_features):
class_values = list(set(row[-1] for row in dataset))
b_index, b_value
在隨機森林的Mllib版本中,有可能使用參數categoricalFeaturesInfo 指定具有名義特徵(數值但仍爲分類變量)的列什麼是ML隨機森林?在用戶指南there is an example使用VectorIndexer的類別特徵轉換矢量爲好,但它的寫有「自動識別類別特徵,並對其進行索引」 In the other discussion of the same problem我發現數值