Problem 2: Predict Probabilities
Easypython
Learn the Concept: Logistic RegressionProblem Description
Write a Python program that trains a Logistic Regression model and prints the predicted probability of the positive class for 3 new examples.
Input
Training data and 3 new examples.
Output
The predicted probabilities for each new example.
Constraints
- None specific.
Example Input
textX=[[1],[2],[7],[8]], y=[0,0,1,1], new=[[3],[5],[7.5]]
Example Output
textProbabilities: [0.12, 0.55, 0.83]
Concepts Covered
.predict_proba().
Related Problems
- Problem 1: Train a Basic Logistic Regression ClassifierEasy · pythonSolve Problem
- Problem 3: Evaluate Predictions Against Actual LabelsEasy · pythonSolve Problem
- Problem 4: Apply a Custom Decision ThresholdEasy · pythonSolve Problem