מודלים של רגרסיה וסיווג לחיזוי מחיר נכסי נדל"ן בוייטנאם.
הוגש כחלק ממטלה #2 בקורס "מבוא למדעי הנתונים" (Course 2686), אוניברסיטת רייכמן, סמסטר ב' 2026, מרצה: סהר מיליס.
1import pickle
2import numpy as np
3import pandas as pd
4
5with open('regression_winner.pkl', 'rb') as f:
6 bundle = pickle.load(f)
7
8model, scaler, cols = bundle['model'], bundle['scaler'], bundle['feature_cols']
9
10X_new = pd.DataFrame([...])[cols]
11if scaler is not None:
12 X_new = scaler.transform(X_new)
13log_price_pred = model.predict(X_new)
14price_vnd = np.expm1(log_price_pred) # החזרה מ-log ל-VND
1with open('classification_winner.pkl', 'rb') as f:
2 bundle = pickle.load(f)
3
4model, scaler, cols, labels = (bundle['model'], bundle['scaler'],
5 bundle['feature_cols'], bundle['class_labels'])
6
7X_new = pd.DataFrame([...])[cols]
8if scaler is not None:
9 X_new = scaler.transform(X_new)
10class_id = model.predict(X_new) # 0 או 1
11class_label = [labels[i] for i in class_id] # 'Below Median' או 'Above Median'
tinixai/vietnam-real-estates — 1M מודעות נדל"ן בוייטנאם, רישיון CC BY-NC 4.0.
דגמתי 50K שורות עם
random_state=42.
CC BY-NC 4.0 (תואם לדאטה-סט המקור).