A lightweight Ridge regression model trained to predict Toronto housing prices based on property features.
1import joblib
2import numpy as np
3import pandas as pd
4
5model = joblib.load("toronto_housing_model.pkl")
6scaler = joblib.load("toronto_housing_scaler.pkl")
7
8# Features: Number_Beds, Number_Baths, Latitude, Longitude, Median_Family_Income,
9# lat_centered, lon_centered, dist_from_center,
10# total_rooms, bed_bath_ratio, beds_sq, baths_sq, income_per_room
11X = scaler.transform([[3, 2, 43.7417, -79.3733, 97000, 0, 0, 0, 5, 1.5, 9, 4, 19400]])
12log_price = model.predict(X)[0]
13price = np.expm1(log_price)
14print(f"Predicted price: ${price:,.0f}")
Open — trained on publicly available data.
This model repository was generated by
ML Intern, an agent for machine learning research and development on the Hugging Face Hub.