Build a set of numerical images from a set of arrays

Assignment Help Data Structure & Algorithms
Reference no: EM133370593

Standard set of instructions for each HW, in this assignment groups will be set up for collaboration.

Make sure your group starts one thread for the collaborative problems. You are required to participate in the collaborative problem and subproblem separately. Please do not directly post a complete, "solution, the goal is for the group to develop a solution after everyone has participated. Please ensure,

you have a write-up with solutions to each problem and subproblems, you are also required to submit, code that will be compiled when grading the assignment. In each of the problems you are allowed to use built-in functions.

Problem 1

"In this problem the goal is to build a set of numerical images from a set of arrays. The data set, is from the Kaggle web site

This data has a training.csv, test.csv and sample submission.csv files. In this exercise the focus, will be on the train.csv data. The web site has the following data description:

The data files train.csv and test.csv contain gray-scale images of hand-drawn digits, from zero, through nine.

Each image is 28 pixels in height and 28 pixels in width, for a total of 784 pixels in total. Each, pixel has a single pixel-value associated with it, indicating the lightness or darkness of that pixel, with higher numbers meaning darker. This pixel-value is an integer between 0 and 255, inclusive.

The training data set, (train.csv), has 785 columns. The first column, called "label", is the digit, "that was drawn by the user. The rest of the columns contain the pixel-values of the associated, "image.

Each pixel column in the training set has a name like pixel x, where x is an integer between, 0 and 783, inclusive. To locate this pixel on the image, suppose that we have decomposed x as, x = i ∗ 28 + j, where i and j are integers between 0 and 27, inclusive. Then pixel x is located on, row i and column j of a 28 x 28 matrix, (indexing by zero).

For example, pixel 31 indicates the pixel that is in the fourth column from the left, and the second, row from the top, as in the ascii-diagram below.

This data is set up in a csv file which will require the reshaping of the data to be 28 × 28 matrix, representing images. There are 42000 images in the train.csv file. For this problem it is only, necessary to process approximately 100 images, 10 each of the numbers from 0 through 9. The, goal is to learn how to generate features from images using transforms and first order statistics.

1. Read-in and store the data in a data structure of your choice so that the data is, "reshaped into a matrix of size 28 × 28 which represents each digit as an image.

2. Display the images for indices 0, 1, 3, 6, 7, 8, 10, 11, 16, and 21. These indices, "represent the numerical values from 0 to 9."

Problem 2

In this problem each image from the train.csv (42,000 images in total) is to be processed to generate a set of features using the discrete cosine transform and Eigen decomposition.

1. Take the 2 dimensional Discrete Cosine Transform (DCT) of each matrix from, "Problem 1, the matrix represents each number (0-9).

2. Extract the vertical, horizontal and diagonal coefficients from the transform (using the indexes indicated by the masks provided).

3. For each of the three sets of DCT coefficients perform Eigen decomposition.,

4. Retain the top 20 Eigen vectors of each direction.,

5. Using your top Eigen vectors reduce the DCT transformed data. This will create, a new data set that represents each image as a smaller subset of values.,

6. Save the new data in a file of your choice, *.txt, *.csv, etc. The name is up to you (you will use this in the subsequent question)."

Problem 3

"In this problem use the developed numerical features from Question 2 (if you are not able to generate the features, they are provided in the module for HW 3). In this problem the following,
"is to be completed:

"Use the Fisher's Linear Discriminant Ratio (FDR) from the Data Processing document, specifically Equation 20.,

1. For each feature and combination of numbers apply the FDR, e.g., 0 vs 1, 0 vs, "2, ..., 0 vs 9, ..., 7 vs 8, 7 vs 9, and 8 vs 9 (which should result in a 60 x 45 matrix where 60 represents the number of features and 45 represents the number of pairwise comparisons),

2. Place the results in a table and provide an initial analysis of which feature, provides the best class separation.

Problem 4

Cross-Validation [2], [7] This is a Collaborative Problem Not covered in lecture notes

"In this problem you are to develop and implement a k-fold cross validation algorithm. You are, "allowed to use either the Iris data set or the developed numerical features from HW2 to test your, "implementation. In this problem the following is to be completed:

1. Develop (pseudocode) an algorithm to randomly shuffle input data. Then divide the data into groups of testing and training sets based on the number of desired folds/experiments, the term used will be k-fold cross validation. Use the 5-fold cross validation in Figure 1 as a reference.,

2. Implement your k-fold cross validation algorithm.,

3. Test your implementation using the numerical features generated question 2.,

4. Perform analysis to determine if your implementation is correct. Explain your, "method of analysis and conclusions."

5. Module 8 Note this is a Collaborative Problem - Parzen Window__<br>,

Problem 5

"In this problem the following is to be completed:,

1. Using your 5-fold cross validation implementation from Problem 4, the Gaussian, "kernel in Eq. 27 (Parzen Window) of the Machine Learning document, implement an, "algorithm to process training observations and compare with test observations,

2. Using all observations and the petal length from the Iris data replicate the subfigures in Figure 2.,

3. Using all observations, the petal length and the petal width from the Iris data, "replicate the subfigures in Figure 3 without contour lines."

Attachment:- collaborative problems.rar

Reference no: EM133370593

Questions Cloud

Explain how you should go about developing the evaluation : Your local public health organization has hired you to lead an evaluation team. Few of your team members have experience with the evaluation process.
Leadership depends on having formal authority : Leadership depends on having formal authority to lead a group of people. Certain leadership competencies are at heart of the relational definition of leadership
What challenges do you foresee within human services field : What are your primary and secondary career aspirations within the Human Services field, and how do these aspirations relate to your personal and professional
Identify two states that did not initially adopt medicaid : Identify two states that did not initially adopt the Medicaid expansion, but since this time, have expanded their Medicaid coverage and explain why this state
Build a set of numerical images from a set of arrays : In this problem the goal is to build a set of numerical images from a set of arrays and generate a set of features using the discrete cosine transform
What are first-listed diagnosis and secondary diagnosis : What are first-listed diagnosis and secondary diagnosis?The patient is a 75-year-old female who has experienced increasingly hooded lateral vision due
Orientalism shapes representations of asian cultures : Can you think of other works in public culture where orientalism shapes representations of Asian cultures?
Identify what the main barrier is in the case : Select one case below and discuss how the patient, the clinician, OR how the two together, could work to leverage patient-generated data (PGD)to improve
Make as future managers of airline in depth explanation : How the study it will impact an individual and the decisions they will make as future managers of an airline. in depth explanation.

Reviews

len3370593

3/24/2023 11:32:00 PM

All written assignments are expected to be typed in a word processor, the preferred submission type is PDF allowing for ease of grading. When using equations, make use of the built-in equation editor for these tools. Try to avoid scanning hand-drawn figures, if needed please ensure they are readable. The grader will make the determination of "readability". If the assignments are not legible, they will be returned to the student with a grade of zero.

Write a Review

Data Structure & Algorithms Questions & Answers

  Define the three types of shortest path problems

Why did Binomial heaps NOT require the mark bits and the rules about losing two children - Determine whether it is possible to draw a circle centered at the origin containing two or more of the points on its boundary.

  Explain compression algorithms are often used in forensics

"Compression algorithms are often used in forensics. Suppose you are involved in a case and have been asked by the lawyer to explain, in general terms.

  Algorithm to decide whether there are 2 integers sum equal x

Note that there is no restriction on integers in set P and integer x, that is, we are not restricting ourselves to positive or negative integers.

  Evaluates the performance of several popular algorithms

This paper evaluates the performance characteristics of several popular compression algorithms and explores two strategies for improving ratios without significantly impacting computation time.

  Compute a shortest-path

Compute a shortest-path from u to v (instead of from u to all the nodes). One way to speed up Dijkstra's algorithm might be to run the algorithm u and from v at the same time.

  Hash values

Suppose these names have the following hash values. Insert them into the extendible hash table shown below. Each leaf can only hold 4 entries.

  Determine the average complexity of an enqueue

question suppose we implement a priority queue as a heap. assume the queue has thousands of elements. suppose further

  Perform the acyclic-topological sort algorithm

Perform the acyclic-topological sort algorithm on the directed graph having vertex set a-k and edges {(j; a);(j; g);(a; b);(a; e);(b; c);(c; k);(d; e);(e; c);(e; f);(e; i);(f; k); (g; d);(g; e);(g; h);(h; e);(h; i);(i; f);(i; k)} Show the state of th..

  Design a representation of display screen

Create a form that lists possible potatoes and toppings in a manner that is easy for counter servers and kitchen crew to scan, and can also be used as input for the inventory reorder system.

  Describe a recursive method for converting a string

Describe a recursive method for converting a string of digits into the integer it represents. For example, "13531" represents the integer 13,531.

  What clustering algorithms are good for big data

Compare and contrast five clustering algorithms on your own. Provide real-world examples to explain any one of the clustering algorithm.

  Question 1 explain the trend that views software as a

question 1 explain the trend that views software as a service rather than a product. what effect has this trend had on

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