This query displays the prediction accuracy:
SELECT (SELECT COUNT(*) FROM housing_prediction, housing_test WHERE housing_prediction.sn = housing_test.sn AND housing_prediction.pred_label = housing_test.homestyle) / (SELECT COUNT(SN) FROM housing_prediction) ) AS PA;
PA |
---|
0.98148148148148148148 |
The prediction accuracy is 98.1%, a large improvement over the Forest_Predict function, whose prediction accuracy is 77.7% on the same input.