Note
This is a machine learning-powered real estate valuation tool built in Rust. It uses Elastic Net Regression to predict property prices based on historical data from real estate listings. As of v0.1.0-pre.alpha.1, Spain + Idealista API is the only country available for scraping.
This AI model processes location-based property features (size, floor, amenities, etc.) to estimate real estate values. It includes scraping, training, and prediction capabilities.
Warning
This model is experimental. It is not a financial advisory tool and should not be used for critical investment decisions.
- Property Price Estimation - Uses Elastic Net Regression to predict real estate prices.
- Automated Data Scraping - Fetches property data from Idealista.
- Machine Learning Training - Builds a model using historical property listings.
- Feature Extraction - Uses location, size, rooms, bathrooms, and more as predictive factors.
- Evaluation Metrics - Computes R² score to assess model performance.
- Prebuilt Database - The package comes with 2500+ homes in spain with 13 data fields per house.
What do you want to do?: Predict Property Price
Enter the size (m²) of the property: 196
Enter the floor number (leave empty if not applicable): 6
Enter the latitude: 32
Enter the longitude: 0.43
Does the property have a lift? yes
Enter price per m² (if not known, leave empty): 3500
Number of bedrooms: 4
Number of bathrooms: 3
Does the property have a swimming pool? yes
Does the property have a garden? yes
Does the property have a garage? yes
Loaded model from output/cervo_model.bin
✅ Loaded existing trained model.
💰 Predicted price: €1122271.88
What do you want to do?:
> Scrape Data
Predict Property Price
Train Model
Exit
- Rust (latest stable)
- Cargo package manager
- CSV dataset (automatically generated from scraper)
git clone https://github.com/NEBYTE/HouseValuation.git
cd HouseValuation
cargo build --release
cargo run --release
This will scrape Idealista real estate listings and save them to data/idealista_homes_spain.csv
.
cargo run --release
The model will process the dataset and generate a trained Elastic Net Regression model saved to output/cervo_model.bin
.
To estimate the price of a custom property:
cargo run --release -- predict
It will prompt the user for property details (size, rooms, location, etc.) and return a predicted price.
- Algorithm: Elastic Net Regression
- Input Features:
- Geolocation (latitude, longitude)
- Size (square meters)
- Floor level
- Number of rooms & bathrooms
- Amenities (pool, garden, garage, lift)
- Evaluation Metric: R² Score
- CSV Format
- Auto-generated via scraper
- Stores property attributes & prices
- Missing values handling
- Data normalization
- Cross-validation (K=5)
[dependencies]
csv = "1.2"
ndarray = "0.15"
linfa = "0.7.0"
linfa-elasticnet = { version = "0.7.0", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
dotenv = "0.15.0"
dialoguer = "0.11.0"
Distributed under the GNU AGPLv3 license.