Two Sigma·Data Scientist·Technical Phone Screen
- Given daily temperature data for NYC and several nearby towns, which town has the largest temperature fluctuation over time? You need to define the metric you use.
- Which town's temperature pattern is most similar to NYC's? Define the similarity metric you use.
- Use the towns' temperature data to predict NYC temperature with a regression model. Evaluate it using MSE.
- Implement greedy forward feature selection: given a target number k, iteratively add the town that most reduces validation MSE until k towns are selected. Return the selected towns and final MSE.
- Implement simple linear regression without an intercept for a single predictor. First solve the batch case, then solve the streaming case where data arrives one pair at a time and the slope estimate updates incrementally.
“The 'define your metric' part is where I stumbled.”