Build a neural network (nn) classifier

Assignment Help Basic Computer Science
Reference no: EM13935336

1. In this question, we are going to build a neural network (NN) classifier to predict red  wine quality (represented by an integer ranging from 0 to 10, higher means better) using a set of chemical properties. These properties are presented as attributes below: fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide, total sulfur dioxide, density, pH, sulphates, alcohol

The last attribute quality is the class label. Download the program "DataSplit2.exe" and execute it. Enter your student ID and specify the locations of the dataset file and the destination folder. The dataset will be split for you by clicking the "OK" button. Note that your training and testing datasets are unique to others. Make sure you enter the student ID correctly.

a. Show your training and testing datasets. Only the first 20 rows of each dataset are required in your answer.
b. Load both datasets into the MATLAB worksp Download the program "DataSplit2.exe" and execute it. Enter your student ID and specify the locations of the dataset file and the destination folder. The dataset will be split for you by clicking the "OK" button. Note that your training and testing datasets are unique to others. Make sure you enter the student ID correctly.

a. Show your training and testing datasets. Only the first 20 rows of each dataset are required in your answer.

b. Load both datasets into the MATLAB workspace. It is recommended to separate the class label (i.e. the attribute quality) from other attributes such that all the class labels of a dataset are stored in a matrix. As a result, there are four matrices after the import process, two for the attribute values from the two datasets, and the other two for the class labels from these datasets.

The class labels require encoding before they can be used for training and evaluating the NN classifier. Since there are 11 distinct class values (0 - 10), each class label is encoded into a column vector of 11 × 1. For a class value k, the k + 1 th row of the column vector is set to 1, while the others are zero. For example, if the class label is 4, then it is encoded into a column vector:

Therefore, if the dataset has N samples, then the class labels are encoded into an 11 × N matrix.

Show only the encoded class labels for the last 20 samples of both the training and testing datasets, i.e. two 11× 20 matrices.

c. The NN classifier is created using the following parameters:
Number of hidden layers: 1
Number of neurons: 10
Use default settings for other parameters. Train the classifier using the training dataset. Show the training performance by pasting the performance curve in your

answer.

Hint: Check carefully the dimension arrangement of the NN classifier, i.e. whether it considers a row or a column as a tuple.

d. Use the NN classifier to predict the qualities of the samples in the testing dataset. Show only the predicted class labels for the first 20 rows of the testing dataset.

e. Obtain and show the confusion matrix. What is the accuracy of the classifier?
Please submit your MATLAB source codes (in MATLAB script file) with the assignment answer. No marks will be given to your answer unless the relevant source codes are submitted.

2. We are going to mine some association rules from the supermarket transactions using WEKA.
a. Download the program "TransactionDataGenerator.exe" and execute it. Enter your student ID and specify the location of destination folder. The dataset will be generated for you by clicking the "OK" button. A transaction file will then be generated in CSV format. Each line row represents a single transaction, the first item is the transaction ID and the others are the goods bought by the customer.

Show only the first 20 lines (transactions) of your transaction file.

b. The transaction file generated must be converted to an attribute format (see appendix) that can be imported to WEKA. For example, a transaction file consists of five transactions as follows:
T001, jam
T002, bread, jam
T003, bread, butter
T004, jam
T005, bread The converted format is shown below:
t_id bread butter jam
T001 t
T002 t t
T003 t t
T004 t
T005 t
The converted transactions can be saved in CSV format. The content of the above converted format in CSV is like this: tid,bread,butter,jam
T001,,,t
T002,t,,t
T003,t,t,
T004,,,t
T005,t,,
Write a conversion program for this task. The list of all items is available at the Appendix. Show only the last 20 converted transactions.

Hints:

i. Since the transactions consist of different number of items, it is recommended to read the whole transaction as a string, i.e. all the N
transactions are put in an N × 1 cell array. You may find functions such as
textscan or importdata useful.

ii. Following (i), it is then necessary to separate the transactions Id and every item in a single transaction. The delimiter is a comma (","). You may find the regular expression function regexp useful.

iii. A transaction schema (i.e. all possible transaction items in the header line of the above converted format) is needed. You transactions might not cover all the items, but this does not affect the final results.

iv. The transaction schema should be implemented as an array in your source codes. Also, the item order in the array should be identical to the item order in the header line. This helps determining which column to put a ‘t' label for a transaction. You may find the function ismember useful.

c. Mine the association rules from the transactions using WEKA. Specify which algorithm you select and the related parameters such as minimum support and confidence. List the best 10 rules discovered with highest possible support and
confidence.

For Q2(b), please submit your source codes (using MATLAB or other languages) with the assignment answer.

Reference no: EM13935336

Questions Cloud

The flyandstay ltd system case study : Your software house decided to design and build the system using the object-oriented methodology, to allow for more flexible design/build iterations and re-use of design and code. You have therefore now been asked to produce the analysis and desig..
Determine the denominators to be used in the calculations : Determine the denominators to be used in the calculations of cost per equivalent unit for material and conversion costs.
Employee benefits and perks : Using key search terms such as "employee benefits and perks", discover what employers are offering their employees in terms of innovative or unusual benefits.
How many chromosomes would there be during metaphase : A certain cell has eight chromosomes before cell division has started. How many chromosomes will there be in one of the daughter cells as a result of mitotic division?
Build a neural network (nn) classifier : In this question, we are going to build a neural network (NN) classifier to predict red  wine quality (represented by an integer ranging from 0 to 10, higher means better) using a set of chemical properties. These properties are presented as attri..
Calculate the amount of material cost : Calculate the amount of material cost, labor cost, and overhead cost in beginning Work in Process inventory.
Describe how cookies can be used to store information : Describe how cookies can be used to store information on a computer and how the information can be retrieved by a PHP program. Assume that cookies are not disabled on the client.
Methods for collecting job analysis data : We discussed several methods for collecting job analysis data. Compare and contrast these methods.
Identify the main account or group of accounts : Identify and discuss why the above situation represents a risk. By applying auditing knowledge, identify the main account or group of accounts affected by this risk in the audit plan

Reviews

Write a Review

Basic Computer Science Questions & Answers

  The largest value that can be loaded into register

the largest value that can be loaded into Register Y of HCS12 is

  Connecting our virtual machine to a virtual standard switch

Connecting our virtual machine to a virtual standard switch (vSS) or virtual distributed switch (vDS) for communication is required in vSphere but proper configuration is also important. This ensures the settings are selected so data flows smoothly a..

  Identify the java-based technologies utilized

1. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utilized. 2. Explain why you believe project managers selected these Java-ba..

  What is the best way to prepare for a course

What is the best way to prepare for a course in computer science, which is specifically fundamentals in web development? I will begin to take  this course in the spring of 2016.

  Derive expression for the effective mips rate

Derive an expression for the effective MIPS rate when using this system for the execution of this program in terms of x, n and α.

  Browser immediately checks data is correct. true or false

When a user enters data into a form then submits the form (typically, by clicking the Submit button), the browser immediately checks that the data is correct. True or False

  Explaining advantages of ansi-tia-eia cabling standards

Discuss in scholarly detail the advantages of the ANSI/TIA/EIA cabling standards.

  Write a risk management policy for an organization

write a risk management policy for an organization. Please include all elements covered (assets, resources, etc.)

  Explain data by state of computer-s electrical switches

Differentiate between computer data represented by the state of computer's electrical switches and meaningful information which is displayed to user.

  Use a recursive function, instead of nested for loops

Write a C program that will prompt the user to enter an integer and then it will print on the screen all the binary numbers of length n, where n is the integer variable inserted by the user.

  Benefits of use-case modeling

Analyze the benefits of use-case modeling and isolate the most advantageous benefit to the firm you currently work or worked in the past and state why.Describe the biggest challenge to the successful use of use-case modeling and recommend how to over..

  Write program convert gps coordinates between three notation

For this program write a simple computer program that converts GPS coordinates between three notional forms

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd