注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
最近看到了一道面试Data Scientist的编程题,没有思路,请大家来帮帮忙
1.0 INTRODUCTION The Nash Food & Beverage Company owns and operates a large bottled water treatment facility that is designed to treat an estimated 2.1 Million liters of fresh water daily. The company extracts its water from a Municipal feed and treats it with a two-stage reverse osmosis (RO) membrane treatment process. The treated water must meet stringent product water quality compliance requirements (permeate conductivity ≤ 60 μS/cm) and the daily volume of treated water must, at minimum, meet the bottled water demand (1.2 Million liters). Prior to the RO system, the feed water is pretreated with multi-media and activated carbon filters. The company’s corporate mandate is to maximize its product water recovery while minimizing system-wide energy consumption and has commissioned you to provide real-time insight into the trade-off behavior between these two conflicting objectives. 2.0 STUDY AREA MODEL The control system is powered by Multi-Input Multi-Output (MIMO) Machine Learning (ML) forecasting models that were trained using historical datasets. The datasets are provided in 5-minute resolution. The models were designed to forecast each asset’s (i.e. pumps, membranes) key process indicators (i.e. flowrate, pressure, conductivity) for the next hour in the treatment plant. Specifically, a single MIMO model receives a feature space (1 x N) and forecasts the process indicator variable for M timesteps ahead. The target space is thus 1 x M. For this preliminary investigation, you will focus on a section which involves two predictive models: • Feed Flowrate Model: MIMO ML model that predict the flowrates of feed water entering the system based on seasonal parameters and historical flowrate observations (i.e. the flows at time t+1, t+2, …, t+12 are predicted by a single model as a function of previously recorded flows at time t, t-1, t-2, …, t-36). Note in this case M = 12. In other words, the Feed Flowrate MIMO model predicts the FeedFlowrate 12 timesteps ahead (since each timestep is 5-mins, this represents an hour ahead forecast). • Primary Pressure Model: MIMO ML model that predicts the pressure produced by the pump based on the feed flowrates. Note that this implies that forecasts of the feed model are used as inputs to the pressure model. (M = 12 as well) 3.0 OBJECTIVES As part of the real-time integration phase, you have been tasked with building a real-time model execution pipeline that will be able to execute the two core models. Specifically, this pipeline will involve developing a python script that will ingest data from a *.csv file from which, it will: 1. Retrieve the required latest chunk of data from the *.csv file 2. Use this data to create a feature space for the feed flow model 3. Execute the feed flow models to forecast feed flowrates for the next hour (12 timesteps) using the provided model file and the single generated feature space (from Step 2). 4. Couple the feed flow forecasts (targets from Step 3) with parameters from the dataset produced in Step 1 to develop the feature space for the primary pressure model. 5. Execute the primary pressure model to forecast primary pressure for the next hour (12 timesteps) using the provided model and the generated feature space (from Step 4)
|