Skip to content
CampusEduX

Problem 2: Predict Probabilities

Easypython
Learn the Concept: Logistic Regression

Problem 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

text
X=[[1],[2],[7],[8]], y=[0,0,1,1], new=[[3],[5],[7.5]]

Example Output

text
Probabilities: [0.12, 0.55, 0.83]

Concepts Covered

.predict_proba().

Related Problems

  • Problem 1: Train a Basic Logistic Regression Classifier
    Easy · python
    Solve Problem
  • Problem 3: Evaluate Predictions Against Actual Labels
    Easy · python
    Solve Problem
  • Problem 4: Apply a Custom Decision Threshold
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...