Implement the prediction function for binary classification using Logistic Regression. Your task is to compute class probabilities using the sigmoid function and return binary predictions based on a threshold of 0.5. A sample is assigned class 1 when its probability is greater than or equal to 0.5 (a probability of exactly 0.5 is class 1) and class 0 otherwise. Return the predictions as an array of integers (0 or 1).