Algorithm · Two Sigma · Medium
You are given an integer k and a list of candidate towns. A validation routine computes the mean squared error (MSE) obtained when any subset of those towns is used as the feature set. Begin with an empty selected set. While fewer than k towns have been selected, evaluate every town that has not yet been chosen by temporarily adding it to the current selection and measuring the resulting MSE. Choose the town that causes the largest decrease in MSE relative to the MSE of the…
Checking your access…