I'm working on a data science project where the goal is to predict daily electricity consumption of a building based on some of its characteristics (e.g., size, location, etc.) and weather features (e.g., temperature, humidity, wind, rain, sun radiation).
Some of my weather features (temperature, humidity, wind) are in hourly intervals and others in daily intervals (rain, sun radiation). My target (daily electricity consumption) is also in hourly intervals.
My goal is to predict daily consumption so I need to aggregate my input data at a daily interval (sum of 24 values for consumption, average of 24 temperatures, ....)
My question is: Do I have to aggregate the data before split train/test of after ?
If I do aggregation first, I will consider only those days with 24 values (one for each hour) and drop others in order to not introduce bias Then I will split train/test. So basically, I will clean my data before splitting.
Am I missing something?