Practice Make Predictions - 7.7 | Chapter 7: Supervised Learning – Logistic Regression | Machine Learning Basics
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Academics
Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Professional Courses
Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

games

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What does the model.predict() function do?

💡 Hint: Think about how predictions are generated.

Question 2

Easy

What are the two possible outputs of the logistic regression prediction?

💡 Hint: Recall what logistic regression is used for.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What method is used to make predictions in logistic regression?

  • fit()
  • predict()
  • train()

💡 Hint: Consider the function that determines forecast results.

Question 2

True or False: A confusion matrix shows the number of correct and incorrect predictions.

  • True
  • False

💡 Hint: Think about what confusion matrices highlight.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Given three students who studied 2, 4, and 6 hours respectively, write the code to predict their pass outcomes using a logistic regression model.

💡 Hint: Focus on how you format new data for prediction.

Question 2

Evaluate the performance of a logistic regression model using the confusion matrix when actual results are [0, 1, 1, 0] and predicted values are [0, 1, 0, 0]. What do you find?

💡 Hint: Recap the definitions of TP, TN, FP, FN and calculate!

Challenge and get performance evaluation