Opendoor Data Science Take Home Problem Set
Instructions ask for three parts: a simple housing price model, top 10 3-grams for a Wikipedia article, and a memoizer function. Submission contains the prompt PDF, a large CSV of housing transaction data, and Python code (`house_knn.py`) that builds a simple nearest-neighbors home price predictor using prior sales and median relative absolute error. A second Python file (`getkclosest.py`) looks like auxiliary/scratch code related to nearest-neighbor logic rather than a complete response to Parts 2 or 3.
Overview
The questions below are meant to give candidates a sense of the problems that we tackle at Opendoor.
The problem set should take around 3 hours to complete.
Part 1. Simple housing model
Your task is to implement a simple model to predict home prices for a small real estate transactions dataset.
Instructions
- Download the sample dataset here. (deprecated)
- Predict the close price as of list date given the other attributes.
- Build separate models with and without
ListPrice. - Feel free to join the dataset to any other data sources, so long as they are not leaky.
Questions
- Describe your methodology. Why did you pick it?
- How well would you do if you excluded the list price?
- What is the performance of your model? What error metrics did you choose?
- How would you improve your model?
- How would you host your model in a production environment to predict values of homes in real-time?
Part 2. Simple n-grams
Generate the top 10 3-grams for the article http://en.wikipedia.org/wiki/N-gram.
Part 3. Memoizer
Write a function that accepts a single-argument function f, and an integer k, and returns a function that behaves the same as f except it caches the last k distinct accessed results of f.
For instance, if memoize is the function we’re after, and let mem_f = memoize(f, 2), then:
mem_f(arg1)→f(arg1)is computed and cachedmem_f(arg1)→f(arg1)is returned from cachemem_f(arg2)→f(arg2)is computed and cachedmem_f(arg3)→f(arg3)is computed and cached, andf(arg1)is evicted
Additional questions
- Can you describe the efficiency of the memoizer?
- How does your memoizer handle concurrent access?
Deliverable
Submit exactly one PDF file containing:
- your responses for all three parts
- all required discussion and answers to the follow-up questions
- any code needed for your solution, embedded in the PDF
If you include code, it must be executable and sufficient to regenerate every solution artifact described in the PDF. Do not submit any files other than the single PDF.