Like the probability that an email is spam or a transaction is fraud, a classifier becomes far more useful when it gives not just "yes/no" but the probability of being positive. With a probability you can move the threshold to be more cautious or more lenient as the situation demands. Complete positive_proba(X_train, y_train, X_test). Labels are 0 (negative) and 1 (positive). Train a logistic regression and return, as a 1-D array, the probability that each sample in X_test is positive (label 1). Example A clearly positive sample comes out near 1; a clearly negative sample comes out near 0.
This challenge asks you to complete a function that trains scikit-learn's logistic regression and returns, as a 1-D array, the probability that each row of new data is positive (label 1). Labels are just 0 and 1, training happens only on the training data, and every value must fall between 0 and 1. It practices the fundamentals of turning a classifier into a probability output.
A classifier becomes far more useful when it reports not just "yes/no" but the probability of being positive, because a probability lets you move the decision threshold to be more cautious or more lenient. Logistic regression is a standard way to produce such a probability with scikit-learn. This problem practices building that probability output and verifying it against real samples rather than trusting it at a glance.