Instructions: In the next exercise, you will use a known dataset used as an example for classification problems. Refer to: Index of /ml/machine-learning-databases/balance-scale (uci.edu). The problem has 3 classes and 4 input features. The possible classes are (B: balanced, L: left, R: right), and the 4 input features are: (LW: left weight, RW: right weight, LD: left distance, RD: Right distance). The balance shows up the value ‘B’ when LW + LD = RD + RW. Each raw of the file data is constructed as the following: Class, LW, LD, RW, RD. Example: B, 3, 2, 4, 1. In addition, all the input features might have values 1, ..., 5. For more information refer to website given before. Remark: you are free to propose a preprocessing of the input features, also you’re advised to try different values of the learning rate and observe the training curve. Remark: in your code, you are asked to use python, numpy and matplotlib. You shouldn’t use libraries like scikit, tensorflow, pytorch, or any other library dedicated to AI. Remark: Provide an intelligible and commented algorithm that shows your deep understanding of your code. Remark: as far as the normalized algorithm is concerned, it is usual to prevent a possible division by zero, so a small real positive number is added to the divisor.

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
icon
Concept explainers
Question

Instructions: In the next exercise, you will use a known dataset used as an example for classification problems.

Refer to: Index of /ml/machine-learning-databases/balance-scale (uci.edu).

The problem has 3 classes and 4 input features. The possible classes are (B: balanced, L: left, R: right), and the 4 input features are: (LW: left weight, RW: right weight, LD: left distance, RD: Right distance). The balance shows up the value ‘B’ when LW + LD = RD + RW.

Each raw of the file data is constructed as the following: Class, LW, LD, RW, RD.

Example: B, 3, 2, 4, 1. In addition, all the input features might have values 1, ..., 5. For more information refer to website given before.

Remark: you are free to propose a preprocessing of the input features, also you’re advised to try different values of the learning rate and observe the training curve.

Remark: in your code, you are asked to use python, numpy and matplotlib. You shouldn’t use libraries like scikit, tensorflow, pytorch, or any other library dedicated to AI.

Remark: Provide an intelligible and commented algorithm that shows your deep understanding of your code.

Remark: as far as the normalized algorithm is concerned, it is usual to prevent a possible division by zero, so a small real positive number is added to the divisor.

Exercise 1: Let’s first study the simple problem in which only 2 classes (R: Right, E: else) are observed. The balance shows up either C1 (R), when RW + RD > 3 or C2 (E) otherwise. The problem now has only two input features RW and RD.

1- Write a function to create the new data set.

2- Write a function to plot the patterns relatives to classes R and E in different colors and different shapes. Is the problem linearly separable? Give an explanation.

Remark: you can include the figure and your response into a markdown cell or provide them in a separate pdf file

Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Concepts in designing Database
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.
Similar questions
  • SEE MORE QUESTIONS
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