sklearn metrics f1_score : pos_label valueError
The parameter pos_label is used to indicate the positive class. In your data, your labels are string based '<=50K' and '>50K'.
You can do one of the following:

Leave pos_label to the default value, set pos_label = 1.
Set pos_label = '>50K' or '<=50K', based on what your +ve class. The positive class is normally attributed to the best outcome, for example, the income that you are trying to predict, is it better if its more than 50K or less than <=50K?
For the below line of code to get the metrics, I'm getting the ValueError mentioned
f1_test.append(f1_score(y_test, y_pred_test, pos_label="str"))
ValueError: pos_label='str' is not a valid label: array([' <=50K', ' >50K'], dtype='
My data has Income vlaue <=50k or >50k.
Please advise.