Tensorflow - logistic regression -oneHot Encoder - Transformed array of different size for both train and test
Your shape is (30, 14) and not (30, 15) because there are only 14 unique values in your test (one is missing). In any case you shouldn't fit the encoder on the test set, just on the training set. Then just transform on the test set and you'll get the correct dimensions.

Also as far as I can see W and b are declared correctly. I'd ask however you take a minute to format your question a bit better next time.