I have the following dataframe, which in reality consists of more data points and days:
df = pd.DataFrame({'day_1': [0,1,1,0,1,1,0], 'day_2': [0,0,1,1,1,1,0], 'day_3': [0,1,1,1,0,0,0], 'day_4': [0,1,0,1,0,1,0], 'day_5': [1,0,1,1,1,0,0]})
day_1 day_2 day_3 day_4 day_5
0 0 0 0 0 1
1 1 0 1 1 0
2 1 1 1 0 1
3 0 1 1 1 1
4 1 1 0 0 1
5 1 1 0 1 0
6 0 0 0 0 0
The zeros and ones should happen at the same indexes for consecutive days. However, due to measurement errors an expected one will sometimes be a zero. Edit: the expected zero can also be a one. I would like to build a simple model that "learns" the desired behaviour and give the expected output for day 6. The desired output is (not know beforehand, but should be learned by the model):
day_6
0 0
1 1
2 1
3 1
4 1
5 1
6 0
I know this can be done by various machine learning options. However, I'd like to implement the code in a small microcontroller, so I was wondering if there is a way to do this without using a lot of computational power.
print (df.max(axis=1))? If not, can you change data sample for better explain it?df.max(axis=1)