輸出結果
實作代碼
boston_house = load_boston()
boston_feature_name = boston_house.feature_names
boston_features = boston_house.data
boston_target = boston_house.target
print('boston_feature_name','\n',boston_feature_name)
print('boston_features[:5,:]','\n',boston_features[:5,:])
print('boston_target','\n',boston_target[:10])
RFR = RandomForestRegressor(n_estimators=15)
RFR = RFR.fit(boston_features, boston_target)
RFR_result=RFR.predict(boston_features)
print('RFR_result','\n',RFR_result[:10])