In this proyect I followed the solutions from the beggining…I dont want to lie. Although I always tryed to reduce the average Root Mean Square Error (RMSE) yet more . For this, I developed my own ideas. Fortunately I could finish this proyect, not without effort and reduce a little RMSE respect solutions.
I hope it would be useful to somebody in case you are stuck in this project, or you want to know other points of view. Your feed back and point of view would be indeed wellcome.
A question I would like to know is: how can we predict the value of a new house, using the model we got after all this process?
What would be the code for make this new predictions? Could anybody tell me please?
PHSP.ipynb (271.3 KB)
Click here to view the jupyter notebook file in a new tab
That’s a great project, congratulations!
To answer your question. After you find the best model you can apply the transform functions to new data, which obviously needs to have the same features as the model, and then you can write another function that predicts the new value using the entire dataset and predicting on the new values.
I’ll show you an example
This is a function (actually is just part of it) that i had to make to predict the air quality index of different cities using some weather variables. When that function is called it will show this
You can do the same with your project.
I hope that i made myself clear
Many thanks. Although yours it’s a different model. It gives me almost a certain idea of the following steps.
Then in your model x_train and y_train subsets would use all data from your dataset? Isn’t there a test subset of data?
I also understand your model uses a different validation, not just k cross fold…
Hi again @Daniel_H
We used a RandomForestRegressor and the entire dataset in x_train and y_train (we probably should have named them different) as the model was already tested, validated and had the least error possible. We used a Randomized Search Cross Validation to get the hyperparameter values that gave us the least error as we showed on this table
If you want to read what we did in that project: https://github.com/Malegiraldo22/Respirable/blob/main/Respirable.ipynb
Thanks again @alegiraldo666 for your explanations, and for sharing your proyect.
I will continue with the machine learning courses, I realize there is a lot to learn… So I’d better wait to learn more about next prediction models.