I have a bag of models that produces 12 predictions for each time period (i.e. one for each period per model). There are three possible prediction target values: buy, flat, sell. I want to look back over the last Y days (eg 30) and for the current prediction period, set the P=Buy, P=Flat, and P=Short values for the 9 predictions with the highest number of “flat” predictions to 0 (in effect excluding them as a later process step eliminates, in effect, flat predictions).
Pretty sure I know how to do the recursive part, but can’t figure out a way to zero out unused values. BTW, I’m doing this because the models go through periods when they return few buy or sell alerts, and in those periods the prediction quality is very low and it negatively impacts overall prediction quality.
Excuse me but I’m not sure to have understand this:
Do you want change the prediction of these 9 records?
Or do you want read these 9 predictions (that have highest number of flat 0 value) and use these values to set current prediction? In this case, how do you want aggregate data from these 9 records to set current values?