摘要: | 房價是反映城市經濟和社會發展的重要指標。近年來,臺灣房價持續上漲,其中以臺北市房價所得比最高,為房地產市場參與者在決策上帶來了挑戰。儘管機器學習技術已被應用於房價預測,但過去的國內研究存在訓練資料未全涵蓋、缺乏精準交易座標、未針對民用和商用交易資料做比較等侷限性。本研究旨在建立機器學習模型並評估表現,比較自用和商用住宅在不同類型房產住宅大樓和華廈在價格預測上特徵的差異。我們蒐集了房屋、地理和經濟三類原始資料,經過資料前處理,建立了一個包含45個預測特徵的資料集,涵蓋臺北市2016至2021年房價交易資料,共44,918筆紀錄。研究採用了隨機森林、極限梯度提升、自適應提升、類神經網路和K近鄰算法等五種機器學習,透過十折交叉驗證訓練模型,並使用五種評估指標評估模型的預測表現。結果顯示,極限梯度提升表現最好R2為0.82,進一步透過分區跑降低房價預測誤差,平均MAE降至254萬,影響房價預測的共同重要因素為房屋所在區域和建築物建造日期。影響民用房價預測的重要因素為交易目標附近的公共設施,而影響商用房價預測的則為交易移轉總面積。;Housing prices are a crucial indicator of urban economic and social development. In recent years, housing prices in Taiwan have continued to rise, with Taipei City having the highest price-to-income ratio, posing challenges for real estate market participants in their decision-making processes. Although machine learning techniques have been applied to housing price prediction, previous domestic studies have had limitations such as incomplete training data coverage, lack of precise transaction coordinates, and failure to compare residential and commercial transaction data. This study aims to develop and evaluate machine learning models, comparing the features of price prediction between self-use and commercial residential buildings and apartments. We collected raw data on housing, geographic, and economic factors, and after data preprocessing, constructed a dataset with 45 predictive features, covering housing transaction data in Taipei City from 2016 to 2021, with a total of 44,918 records. The study employed five machine learning algorithms: Random Forest, Extreme Gradient Boosting, Adaptive Boosting, Neural Networks, and K-Nearest Neighbors. The models were trained using ten-fold cross-validation and evaluated with five performance metrics. The results showed that Extreme Gradient Boosting performed the best with an R² of 0.82. Further, regional partitioning reduced the prediction error, lowering the average MAE to 2.54 million NTD. The common key factors affecting price prediction were the region of the house and the construction date of the building. Important factors for predicting residential prices included the proximity of public facilities to the transaction target, while for commercial prices, the total transferred area was significant. |