NATIONAL UNIVERSITY, HANOI INTERNATIONAL SCHOOL GRADUATION PROJECT PROJECT NAME: APPLYING MACHINE LEARNING METHODS TO PREDICT REAL ESTATE PRICES Student’s name : Nguyen Thi Thuy Dung Hanoi – 2024 VIETNAM NATIONAL UNIVERSITY, HANOI INTERNATIONAL SCHOOL GRADUATION PROJECT PROJECT NAME: APPLYING MACHINE LEARNING METHODS TO PREDICT REAL ESTATE PRICES SUPERVISOR: DR. TRUONG CONG DOAN STUDENT: NGUYEN THI THUY DUNG STUDENT ID: 20070687 COHORT: QH2020 SUBJECT CODE: INS401101 MAJOR: MIS ( Management Information System ) Hanoi – 2024 2 ACKNOWLEDGEMENTS First, I would like to thank the Board of Directors of the International School - Hanoi National University for creating a good environment for me to study and acquire valuable knowledge over the years. I would like to express my deep gratitude to teacher Dr.Truong Cong Doan for enthusiastically guiding, orienting, and supporting me throughout the process of completing my graduation thesis, helping me approach the way of thinking, solving and presenting a problem that needs research. These things have helped me overcome my own limitations and difficulties to complete my thesis successfully and on time.
I also send my sincere thanks to the teachers at the school, especially the teachers in the Faculty of Technology and Applied Sciences for teaching me during my time studying at the school. With the knowledge and lessons learned, it will help you be more confident in work, life and future goals. I would also like to thank my family, relatives, colleagues and friends for their constant care and encouragement; Thank you teacher Dr. Truong Cong Doan for sharing your experiences and providing useful materials during your studies and research as well as throughout the process of completing your graduation thesis.
Although I tried to complete the thesis with all my efforts and abilities, there are certainly still many limitations and shortcomings. I hope to receive sympathy and valuable suggestions from teachers and friends. Hanoi, 17th June 2024 Dung Nguyen Thi Thuy Dung DECLARATION I hereby declare that the knowledge presented in this thesis was researched, researched and presented by me. During the process of writing my thesis, I consulted relevant documents and clearly stated the source of those references.
The new results in the thesis are my own, not copied from any other work. If there is anything dishonest, I take full responsibility. Student 4 LIST OF ACRONYMS Acronyms Meaning MAE Mean Absolute Error MSE Mean Squared Error SVM Support Vector Regression AL Artificial Intelligence ML Machine Learning GDP Gross Domestic Product FN False Negative FP False Positive TN True Negative TP True Positive ME Max Error DL Deep Learning 5 LIST OF TABLES Table no. Figure name Table 1 Data set Properties_2016 Table 2 Compare ML and DL Table 3 Math result LIST OF FIGURES Figure no.
Figure name Figure 1 Introduction Figure 2 Kaggle Figure 3 Heatmap Figure 4 Machine Learning Figure 5 Model Figure 6 Model Supervised Learning Figure 7 Model Unsupervised Learning Figure 8 Model Semi-supervised Learning Figure 9 Model Reinforcement Learning Figure 10 Model Random Forest Figure 11 Model Linear Regression Figure 12 Model Decision Tree Figure 13 Model SVM Figure 14 Model Practical Applications of Machine Learning Figure 15 Compare Machine Learning and Deep Learning Figure 16 Matplotlib Library Figure 17 Series and Dataframes in Pandas Figure 18 Training Phase Figure 19 Missing Values 6 TABLE OF CONTENTS ACKNOWLEDGEMENTS. 4 LIST OF ACRONYMS. 5 LIST OF TABLES. 15 CHAPTER II : MATERIAL AND METHODS.
Introduction to Data. Why use Kaggle for data science research. What is the data?. About Machine Learning.
Workflow in Machine Learning. Machine Learning Methods. Common Algorithms of Machine Learning. Support Vector Regression (SVM).
Practical Applications of Machine Learning. Data Source and Data Preparation. Difference Between Machine Learning and Deep Learning. Why Machine Learning ?.
Tools used in the problem. How to tune the model. 51 CHAPTER III: RESULTS. Solving the problem.
Results of model improvement. 67 CHAPTER IV: CONCLUSIONS AND DEVELOPMENT DIRECTIONS. Reasons for choosing a topic In the context of the continuous development of information technology, especially the "data revolution", computers have become an indispensable part of people's lives. ML, a branch of artificial intelligence (AI), focuses on building predictive models from data.
Algorithms and methods in this field help analyze and understand data patterns to make predictions or decisions without direct human intervention. The application of ML in the real estate sector, especially price forecasting, plays an important role in making buying, selling, or investing decisions. Real estate price forecasting not only helps individuals and businesses accurately value assets but also helps predict market trends, creating effective business strategies. This contributes to economic development in all aspects: ● Investors: Need accurate price forecasts to make smart investment decisions and optimize profits from the real estate market.
● Buyers and sellers: Buyers need accurate information to avoid overpricing, while sellers want to make sure they don't sell the property cheaply. ● Governments and regulators: Information is needed to monitor and regulate the market, ensuring stability and fairness. Participating in real estate price forecasting contests or projects on the Kaggle platform offers many benefits. First, Kaggle provides a diverse and rich dataset from a variety of sources, supporting the research and development of reliable forecasting models.
Second, Kaggle is a large community of data scientists, machine learning engineers, and AI experts, providing opportunities to learn and exchange experiences. Finally, projects on Kaggle are highly practical, helping to test and improve skills from data preprocessing to refining the model's hyperparameters. In conclusion, choosing a machine learning application for real estate price forecasting on Kaggle not only meets the practical needs of the market, but also provides an opportunity to learn and develop skills for individuals or research groups. Research Objectives The main goal of the project is to research and apply machine learning methods to predict real estate prices accurately and effectively.
This not only improves predictability, but also supports investors, businesses, and financial institutions in making strategic decisions, minimizing risk, and maximizing profits. Specifically, the research objectives of the project include: ● Real estate data analysis and preparation: - Clean data to remove missing or invalid values, ensuring accurate and consistent data. - Transform and normalize data to match the requirements of machine learning models. ● Building ML models to predict real estate value: - Apply common ML algorithms such as Linear, Logistic, Decision Trees, Random Forests, and Artificial Neural Networks.
- Test and adjust the hyperparameters of the models to find the optimal configuration. - Combine models to create a powerful and diverse prediction system that is capable of processing different types of data and making more accurate predictions. ● Evaluate the effectiveness of models and compare them: - Evaluation metrics such as MAE, MSE, and R-squared are used to measure the accuracy of the models. - Perform a cross-validation process to test the stability and generalizability of models on different data sets.
● Recommend the most accurate real estate price prediction model: - Based on the evaluation and comparison results, select the model or combination of models with the best performance. - Recommend this model to investors, businesses, and financial institutions so that they can use it in practice. - Make recommendations on how to improve and expand the research in the future, including integrating new data sources, testing more advanced 10 machine learning algorithms, and applying the model to real estate markets other than New York. ● Applying the model in practice: - Develop an online software system or tool based on the selected prediction model, which allows users to enter real estate-related information and receive value predictions instantly.
- Organize seminars or training sessions to introduce and guide stakeholders in the real estate industry. - Conduct real-world tests and collect feedback from users to continuously improve and refine the predictive model. Through the implementation of the above goals, the project not only contributes to improving the ability to predict real estate prices but also opens up new research directions in applying machine learning to other economic fields, creating a premise for the sustainable. Research Mission In order to achieve the set objectives, the project needs to carry out a series of specific and detailed research tasks, in order to ensure that the steps are carried out systematically and scientifically.
These tasks include: ● Collect and aggregate real estate data: - Search for reliable data sources: Contact statistical agencies, real estate companies, and online data platforms to collect information about the selling price, characteristics of the properties (such as area, location, number of rooms, legal status, etc. - Integrate data from multiple sources: Combine data from different sources to form a rich and diverse dataset, including historical and current data. ● Data processing and preparation: - Data Cleaning: Detects and handles missing values, outliers, and data errors to ensure accurate and consistent data input. For example, using techniques such as replacing missing values with averages or medians, removing or correcting faulty data.
- Data normalization: Transforming data attributes to the same scale or format, such as standardizing units of measurement, encoding classification variables 11 into variables (one-hot encoding), and normalizing numeric values (normalization). - Calculate and extract features: Use data analysis techniques to generate new features from the original data, making it possible for ML models to understand and learn patterns from the data. ● Build machine learning models: - Selection of ML algorithms: Consider and select appropriate machine learning algorithms to apply to the problem of predicting real estate prices, including linear, logistic, decision trees, random forests, and artificial neural networks. - Model training: Apply ML algorithms to the training dataset to build predictive models.
Adjust the hyperparameters of the algorithms to optimize the model's performance. - Model optimization: Use techniques such as hyperparameter tuning, cross- validation, and ensemble techniques. ● Review and comparison of models: - Use evaluation metrics: Evaluate the performance of models based on metrics such as MAE, MSE, and Definite Coefficient to measure the accuracy of predictive models. - Perform cross-validation processes: Test the stability and generalizability of models on different datasets.
- Comparison of models: Analyze and compare the results from different models. ● Implement and propose the optimal predictive model: - Select the optimal model: Based on the evaluation and comparison results, select the model or combination of models with the best performance for practical implementation. - Application system development: Build an online software system or tool based on the selected model, allowing users to enter real estate-related information and receive value predictions instantly. 12 - Continuous evaluation and improvement: Collect feedback from users and make continuous improvements to ensure the system is always working efficiently and meeting actual needs.
● Research and propose future development directions: - Expand the scope of the study: Consider the application of the model to real estate markets other than New York, studying the specific factors of each area to improve the accuracy of the model. - Testing advanced algorithms: Research and apply new and more advanced ML algorithms, such as deep learning, to explore the potential to improve predictive efficiency. - Integrate more data sources: Collect and integrate new data sources such as data on economic trends, housing policies, and infrastructure information to enrich datasets and improve models. By carrying out the above tasks, the project not only achieves the research objectives but also contributes to the development of the field of real estate price prediction, opening up many new opportunities and applications in the future.
Scope of study Real estate price forecasting projects can leverage data from various sources such as real estate websites, government agencies, commercial organizations, and real estate companies. The data collected may include information about the sale/rental price, area, geographic location, surrounding social facilities, property type, year of construction, and other factors that affect the price. Currently, real estate price forecasting has become a popular area of research in both the machine learning community and the real estate market.