End-to-End ML-Powered Sarajevo Real Estate Application#10
End-to-End ML-Powered Sarajevo Real Estate Application#10
Conversation
Written the project pitch related to our data and added a notebook that does feature analysis
Generated by create-expo-app 3.5.3.
Updated README to reflect project details and features.
All code errors have been successfully resolved: Renamed use-prediction-history.ts to use-prediction-history.tsx - The file contained JSX code but had a .ts extension Fixed import paths - Updated all imports to use the correct kebab-case filenames: usePredictionHistory → use-prediction-history useColorScheme → use-color-scheme Colors → imported from theme.ts Created missing TabBarIcon component - Added the component that was being imported but didn't exist Fixed TypeScript return type - Added proper React import and return type annotation for PredictionHistoryProvider
Supabase client with AsyncStorage for persistent sessions AuthContext provider with global auth state API service with automatic JWT token injection Sign in/up screens with modern gradient UI Updated Screens: Profile Tab - Shows user info, menu items, and sign out button (or guest features for non-authenticated users) Predict Screen - Now uses makePrediction() from API service with auth headers, displays user email in header History Screen - Fetches user-specific predictions from backend for authenticated users, falls back to local storage for guests
Dockerized FastAPI backend with ML runtime & Nginx reverse proxy
|
Question regarding rentals model input features I wanted to double-check one thing before we merge. In the backend, feature construction for predictions currently includes the condition field: For rentals, the frontend will not send condition (as agreed earlier), so it will be empty on the backend. Can you confirm whether condition was dropped from the rentals model during training, or whether the model expects it to be present ? I just want to make sure this won’t affect rental predictions once this PR is merged, since after merging I plan to deploy the backend to AWS EC2. Thanks! |
We haven't agree on rentals dropping all of the conditions. In the feature analysis notebook rentals just cannot have the "in constructions" and "needs renovation" as their condition. As logically you cannot rent an apartment that isn't built nor the one that needs repairs. The features for both rentals and sales are the same just the domain is difference for some |
|
Here is the core logic for our model, where i differentiated ConditionType for Sale and Rent, maybe you can take a look one more time at this file: backend/app/api/predict.py |
EmreArapcicUevak
left a comment
There was a problem hiding this comment.
Just please close pending reviews with the reference to the commit and changes that were done to the target file
EmreArapcicUevak
left a comment
There was a problem hiding this comment.
Most of these changes fixed what I wanted. The only think I really want changed is the flats.csv file to be removed. Other changes are optional good job Mustafa :)
…fic function so predict api does not know anything about that
Home Page – Price Prediction
Added a home screen where users can select a feature set (location, size, rooms, condition, etc.).
The app uses trained ML regression models to predict the expected market price of a property.
Predictions are returned instantly and are based on cleaned, preprocessed historical data.
All ML models are loaded once at application startup and reused across requests to ensure fast response times and improved stability.
Prediction History
Implemented prediction history tracking, allowing users to review previously generated price predictions.
Enables comparison and transparency of model outputs over time.
Listings & Deal Score Evaluation
Integrated real estate listings enriched with predicted prices.
Each listing is assigned a Deal Score (0–100) that reflects how favorable the asking price is compared to the predicted market value.
Deal Score Logic
def deal_score_from_diff(diff_pct: float, min_diff: float, max_diff: float) -> int:
"""
Convert relative price difference to a deal score in range [0, 100].
Lower-than-expected prices result in higher scores.
Overpriced listings receive lower scores.
Scores are normalized using observed market ranges to ensure consistency.
Favorites Management
Added the ability to add and remove listings from favorites.
Favorites are persisted and can be revisited later by the user.
Improves usability and supports shortlisting of interesting properties.
Statistics & Market Insights
Implemented a statistics section based on cleaned and preprocessed data stored in the database.
Includes:
All statistics are computed from validated, normalized data produced during preprocessing.
ML & Data Integration Improvements
ML models are loaded once on first application run and reused across the app lifecycle.
POI (Points of Interest) data is also cached and reused.