is this even possible? Advanced ML question in Python

Lets see if I can describe this in words… I guess this is best described as a time series, so I have this “event” that randomly occurs.  I can easily create a feature that outputs a “1” when event is true, else “0”.  I want to tell the algorithm(s) to actually “predict” when true"1", but taking into account the past (n) “0” rows as well…   So I don’t want it making predictions AT ALL on the “0” rows, but I can’t just combine them without losing the information gained from the series aspect.    My first thought was to create an “if” statement that pushes the “1” + past(n) rows to a new DF which is fed through the algo, but it still treats each row as a prediction.  I want to specifically state that all rows count towards the single prediction at the end… in a way that keeps the sequential aspect of the data in tact.  ANY HELP at all would be sooooooo appreciated!!!  Even terms to search to help me find the answer…

1 Like