0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

東京都 家賃予測

Last updated at Posted at 2025-01-18

SUUMOのホームページから東京都23区を指定して家賃を予測するモデルを作成する。

【データの前準備】
1.必要なライブラリをインポートする。
東京都家賃予測1.png

SUUMOの東京都23区を指定したURLよりスクレイピングを実施してCSVに保存しデータ内容を確認する。
東京都家賃予測2.png
東京都家賃予測3.png
東京都家賃予測4.png

列名が数値のため、わかりやすくするために編集。
東京都家賃予測5.png

欠損値の確認を行う。(今回は無し)
東京都家賃予測6.png

不要な列の削除を行う。(URLの削除)
東京都家賃予測7.png

「築年数」の種類数確認と、文字列から数値への変換を行う。
image.png

同様に「建物階数」、「階数」、「家賃」、「面積」、「住所」、に対しても実施する。
image.png
image.png

「種別」、「間取り」はOnehotベクトル化を行い、ヘッダーの確認を行う。
image.png

【分析】
標準化を行い、5つのモデルを使用して以下3つの指標を出す。
MAE...平均絶対誤差 (MAE, Mean Absolute Error)
MSE...平均二乗誤差 (MSE, Mean Squared Error)
RMSE...二乗平均平方根誤差 (RMSE: Root Mean Squared Error)
image.png

結果を見ると、ランダムフォレストが一番精度が高いことが分かった。
image.png

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?