Explain the difference between regression and classification

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Explain the difference between regression and classification

Expert Solution
Step 1

The solution to the given question is:

Regression and Classification algorithms are supervised learning algorithms. Both algorithms are used for prediction in machine learning and operate on labeled datasets. However , the difference between them lies in the way they are used for different machine learning tasks.

The key difference between regression and classification algorithms is that regression algorithms are used to predict continuous values such as price , salary , age , etc. whereas classification algorithms are used to predict/classify discrete values such as male or female , true or false will be , whether spam or not spam etc.

EXAMPLE 

WHICH OF THE FOLLOWING IS A CLASSIFICATION PROBLEM?

  • Predicting a person's gender by handwriting
  • Predicting house prices by area
  • Predicting whether the rainy season will be normal next year
  • Predicting next month's album sales

SOLUTION

Predict a person's gender Predict whether next year's rainy season will be normal. The other two are regression. We have discussed classification with a few example in python that uses RandomForestClassifier to perform classification on an iris dataset.

 

EXAMPLE

WHICH OF THE FOLLOWING IS A REGRESSION TASK?

  • Predicting age of a person
  • Predicting nationality of a person
  • Predicting whether stock price of a company will increase tomorrow
  • Predicting whether a document is related to sighting of UFOs?

SOLUTION

Predicting age of a person (because it is a real value , predicting nationality is categorical , whether stock price will increase is discrete-yes/no answer , predicting whether a document is related to UFO is again discrete-a yes/no answer).

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Primary components of process planning
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education