Now, let's train a model using all the selected features:
log_reg = LogisticRegression(C=1e6)log_reg.fit(X_train, y_train)
The model has been trained using all the features we have in X_train. We know that this model produces probabilities as outputs; to get these probabilities for such models we have the predict_proba method, which will produce a two-dimensional NumPy array with each column giving the probability of the observation belonging to the respective class. In this case, the first column corresponds with the probability associated with the negative class (labeled as 0) and the second column corresponds with the probabilities for the positive class. Here, we have the first 10 predicted probabilities ...