…e computationally expensive as the algorithm parse through all data points for each classification. For these reasons, kNN tends to work best on smaller data-sets that do not have many features.
…t“ it builds, is an ensemble of Decision Trees, most of the time trained with the “bagging” method. The general idea of the bagging method is that a combination of learning models increases the overall result.
In fact, everything after the function declaration in line 12 is technically middleware since it modifies a user request. You will see in the diagram at the end.