Evaluation Query #44
Replies: 2 comments 1 reply
-
This brings up an excellent point. The shape of the evaluation data is a bit different and easier to work compared to when I originally wrote these sections of the examples. This idea does work but will need a bit more than |
Beta Was this translation helpful? Give feedback.
-
The queries related to the evaluation tables are now simplified. The changes were pushed in this commit. Thank you again for bringing this up! |
Beta Was this translation helpful? Give feedback.
-
Hi Mike,
Have a question regarding the evaluation query.
When we are trying to Calculate the time between TIME_COLUMN and prediction_on{TIME_COLUMN} and keep the rows that are 0 = same day,
can the below query
WITH
FORECASTS AS (
SELECT
DATE(starttime) as starttime,
DATE(predicted_on_starttime) as predicted_on_starttime,
CAST(num_trips as INT64) AS num_trips,
start_station_name,
predicted_num_trips.value as predicted_num_trips
FROM
*******__forecasting.automl-python_eval
),
LEAD_DAYS AS (
SELECT *,
DATE_DIFF(starttime, predicted_on_starttime, DAY) as prediction_lead_days
FROM FORECASTS
),
LATEST AS (
SELECT start_station_name, starttime, min(prediction_lead_days) as prediction_lead_days
FROM LEAD_DAYS
GROUP BY start_station_name, starttime
)
SELECT *
FROM LATEST
LEFT OUTER JOIN LEAD_DAYS
USING (start_station_name, starttime, prediction_lead_days)
ORDER BY start_station_name, starttime
simply be replaced by
SELECT * FROM
*******__forecasting.automl-python_eval
where starttime = predicted_on_starttime
Beta Was this translation helpful? Give feedback.
All reactions