RyanZLiu / student4

MIT License
0 stars 0 forks source link

ML Project #2

Open RyanZLiu opened 3 months ago

RyanZLiu commented 3 months ago

This is what I worked on: Our ML project was to calculate the price of a house after inputted specific characteristics such as size, stories, bedroom, bathrooms, etc. I worked on the backend where I created a model to calculate the estimated price of a house given the user inputs.

Here is the original :

image

This Python script is designed to predict the price of a house using machine learning methods. It begins by loading a dataset containing information about various houses, including their features and prices. The script then preprocesses the data, converting categorical variables into numerical values to prepare it for training. Using a RandomForestRegressor model, the script trains on the dataset, learning patterns between house features and prices. When prompted, users can input details about a house they're interested in, such as its size, number of bedrooms, and amenities. The script processes these inputs, converts them into a format suitable for the model, and then predicts the price of the house based on the learned patterns. This provides users with a convenient tool to estimate house prices based on specific attributes, leveraging machine learning to make informed predictions in the real estate market.

A problem with this code was that it was too script-like so I collaborated with Hanlun to add classes and functions. (OOP)

image