[solved]-Given Humidity Data Days Spanning Startdate Enddate Inclusive Predict Hourly Humidity Data Q39036120





using python can you solve this
Given humidity data for the days spanning from startDate to endDate inclusive, predict the hourly humidity data for each of the timestamps in timestamps. Function Description Complete the function predictMissing Humidity in the editor below. The function must return an array of floating point numbers where the value at each index i denotes the humidity at timestamps[i]. predictMissing Humidity has the following parameter(s): startDate: string. The first day of humidity data in the format yyyy-mm-dd. endDate: string, The last day of humidity data in the format yyyy-mm-dd. known Timestamps[known Timestamps[0]….known Timestamps[m-1]]: an array of strings of timestamps in the format yyyy-mm-dd hh:00. humidity[humidity[),…humidity[m-1]]: an array of floating-point numbers representing humidity[ioccurring at known Timestamps[i]. timestamps/timestamps(0)….timestamps(n-1]): an array of strings of timestamps to predict for in the format yyyy-mm-dd hh:00. Constraints • 2013-01-01 s startDate sendDate < 2015-01-01 • 1 sms 3476 • 1sns 915 Input Format for Custom Testing Input from stdin will be processed as follows and passed to the function. The first line contains a string, startDate. The second line contains a string, endDate. The third line contains an integer, m, the number of elements in the array known Timestamps Each of the next m lines contains a string describing known Timestamps[i]. The next line contains an integer, m, the number of elements in the array humidity. Each of the next m lines contains a floating point number describing humidityli). The next line contains an integer, n, the number of elements in timestamps. Each of the next n lines contains contains a string describing timestamps[j]. Evaluation • The predicted humidity at a timestamp is considered to be correct if the absolute difference between the actual and predicted humidities is not greater than 0.25. • The accuracy of the prediction is defined as: (Total number of correct predictions • The score for each test case is calculated as: accuracy * (test case weight). • The final score is the sum of all test case scores. Sample Case o Sample Input 0 2013-01-01 2013-01-01 19 2013-01-01 00:00 2013-01-01 01:00 2013-01-01 02:00 2013-01-01 03:00 2013-01-01 04:00 2013-01-01 05:00 2013-01-01 06:00 2013-01-01 08:00 2013-01-01 10:00 2013-01-01 11:00 2013-01-01 12:00 2013-01-01 13:00 2013-01-01 16:00 2013-01-01 17:00 2013-01-01 18:00 2013-01-01 19:00 2013-01-01 20:00 Expected Output 0 0.64 0.55 0.44 0.44 0.52 Sample Output o 0.1 0.5 Explanation o Given the m = 19 hours of humidity data on 2013-01-01, the task is to predict n = 5 hours of missing humidity data for the timestamps in timestamps. The table below depicts sample predictions for the given humidity data that contains a total of 3 correct predictions. The accuracy of these predictions is 5 = 0.60 and, because the test case weight is 5, the total score for this test case is 0.60 x 5 = 3. Explanation o Given the m = 19 hours of humidity data on 2013-01-01, the task is to predict n = 5 hours of missing humidity data for the timestamps in timestamps. The table below depicts sample predictions for the given humidity data that contains a total of 3 correct predictions. The accuracy of these predictions is /s = 0.60 and, because the test case weight is 5, the total score for this test case is 0.60 x 5 = 3. HUMIDITY Timestamp Humidity Predicted Humidity Humidity Difference Correct Prediction? 2013-01-01 07:00 0.64 0.1 0.54 Incorrect 2013-01-01 09:00 0.55 0.2 0.35 Incorrect 2013-01-01 14:00 0.44 0.14 Correct 2013-01-01 15:00 0.44 0.4 0.04 Correct 2013-01-01 22:00 0.52 0.02 Correct Show transcribed image text Given humidity data for the days spanning from startDate to endDate inclusive, predict the hourly humidity data for each of the timestamps in timestamps. Function Description Complete the function predictMissing Humidity in the editor below. The function must return an array of floating point numbers where the value at each index i denotes the humidity at timestamps[i]. predictMissing Humidity has the following parameter(s): startDate: string. The first day of humidity data in the format yyyy-mm-dd. endDate: string, The last day of humidity data in the format yyyy-mm-dd. known Timestamps[known Timestamps[0]….known Timestamps[m-1]]: an array of strings of timestamps in the format yyyy-mm-dd hh:00. humidity[humidity[),…humidity[m-1]]: an array of floating-point numbers representing humidity[ioccurring at known Timestamps[i]. timestamps/timestamps(0)….timestamps(n-1]): an array of strings of timestamps to predict for in the format yyyy-mm-dd hh:00. Constraints • 2013-01-01 s startDate sendDate
Expert Answer
Answer to Given humidity data for the days spanning from startDate to endDate inclusive, predict the hourly humidity data for each… . . .
OR

