## 4 Experiment
### Methodology of Stacking Models  
Stacking, also known as stacked generalisation, is an ensemble learning method that combines multiple algorithms to increase prediction accuracy. Using the same dataset, several base models are trained, and the predictions from these models are then used as inputs for a meta-model. Known by another name, the \"stacker\", this meta-model learns to combine the outputs of the base models to generate a final forecast. In the stacking process, several base models are initially chosen and trained on the training dataset. These algorithms can vary widely, including LR, tree-based models like RF and GBR, as well as neural networks, including FNNs and PyTorch-based neural networks. Every base model learns to forecast results using the provided feature set. After training, these models provide level-1 predictions, which are estimations made on a validation set. The next stage involves creating a new dataset, with each occurrence represented by the expected values from the base models. This dataset is then used to train the meta-model, which learns to optimally combine the predictions of the base models to produce an output. The meta-model delivers the final aggregated forecast for novel information by merging the predictions of the underlying models, which can be any predictive model. In predictive modelling, the stacking strategy provides several crucial benefits. Stacking technique employs the distinct strengths of various model types-including linear models, tree-based models, and neural networks-while mitigating their weaknesses. This approach frequently yields better performance than using a single method alone. Predictive accuracy is typically improved by the ensemble technique due to the meta-model, or \"stacker\", which learns how to effectively incorporate projections from base models using complementary strengths. Furthermore, stacking method minimises individual model deficiencies, reducing variance and overfitting, resulting in more robust and trustworthy predictions. This study used a PNN in conjunction with various other methods, such as RF, GBR, XGB, and LR, to build stacking models. The goal of this hybrid strategy was to achieve better accuracy and stability than individual models by leveraging the distinctive capabilities of each algorithm. Performance significantly improved with PNN stacking, as evidenced by higher R\({}^{2}\) scores and lower RMSE values across various feature sets. The research effectively solved the difficulties involved in rental price prediction by layering several models, greatly improving overall predictive performance. The developed methodology provided stakeholders with important insights by accurately forecasting rental prices in the German real estate market. Table 2 presents the R\({}^{2}\) score and RMSE values for the four ML methods without the PyTorch framework across the two feature sets. These four algorithms demonstrated a satisfactory level of accuracy. Nevertheless, for both feature sets, the singular models that did not use PyTorch exhibited lower R\({}^{2}\) scores, particularly evident for XGB and LR in set 1, as well as all tree-based models in set 2. These results suggest a reduced level of predictive accuracy, with elevated RMSE values suggesting more substantial prediction errors. The models in set 1 exhibited R\({}^{2}\) values ranging from 0.8903 to 0.9187, with the XGB model having the lowest score and the RF model achieving the highest score, with RMSE values ranging from 375.57 to 289.87. In set 2, the models displayed R\({}^{2}\) values that varied from 0.8717 to 0.9045, with the XGB model obtaining the lowest score and the LR model receiving the highest score, corresponding to RMSE values ranging from 364.23 to 314.21. While RF achieved the highest accuracy of 0.9187 in set 1, its performance was somewhat lower in set 2, with an R\({}^{2}\) score of 0.8866. This suggests that the performance of a single model can be compromised when the characteristics change, thus impeding the dependability and reliability of the model.