time serie with only two values Could any one help me know about different approaches, methods or algorithms to build a model to forcast a time serie which has only two values ( 0, 1 ) but they last over time each time . 
basically I've some on/off data, it tell me if there is an object in a place and how much time that object was in that specific place . So the output is a rectangular wave but it's not periodic. 

so if we have the object in that place field we will get 1 every x seconds then when there is nothing we will get 0 . 
Thanks in advance of your response!
First you should define your goal for the prediction. Do you want to predict also a time series output? Then the best thing to do is to use any machine learning model that is sequence focused (e.g. is LSTM), and with the time series that you have as input. Also study the time scale of your model. Study if it should be hour, minutes or any other scale.