Skip to content

Commit 65eaa6f

Browse files
Update random_forests_train.py
1 parent 9e3e161 commit 65eaa6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Chapter_5 Random Forest/random_forests_train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ def save_model(trees_result, trees_feature, result_file, feature_file):
141141
if __name__ == "__main__":
142142
# 1、导入数据
143143
print "----------- 1、load data -----------"
144-
data_train = load_data("data_2.txt")
144+
data_train = load_data("data.txt")
145145
# 2、训练random_forest模型
146146
print "----------- 2、random forest training ------------"
147-
trees_result, trees_feature = random_forest_training(data_train, 1)
147+
trees_result, trees_feature = random_forest_training(data_train, 50)
148148
# 3、得到训练的准确性
149149
print "------------ 3、get prediction correct rate ------------"
150150
result = get_predict(trees_result, trees_feature, data_train)

0 commit comments

Comments
 (0)