I have a set of values
y_train=["User","Bot","User","Bot",.......]
y_pred=["Bot","User","User","Bot".........]
I want to generate an array which returns 1 if the values of y_train[i] and t_pred[i] dont match.Both y_train and y_pred consist of same no of values
That is array indicator should be:
indicator=[1,1,0,0..........]
I have tried
indicator=0
for i in range(len(y_train)):
if y_train[i]!=y_pred[i]:
indicator[i]=1
else:
indicator[i]=0
But error being shown is :
'int' object does not support item assignment
How could this be done? Thanks