ECG (electrogardiogram) signals are signals taken from the human body in order to measure the activity...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
ECG (electrogardiogram) signals are signals taken from the human body in order to measure the activity and health of the human heart. An ECG signal shows whether a patient has heart disease (called abnormal signal) or does not have heart disease (normal signal). The figure below shows 3 ECG signals. The top 2 are normal and the third one is abnormal. These signals were taken from real data representing patients at a hospital. ** LEI An ECG signal is represented in the computer using a 1-D array of data. You are to write a program that measures the similarity between 2 ECG (heart) signals. You will measure the similarity of the top signal (Reference - Normal) compared to the bottom two signals. The similarity measure for this homework assignment is the "normalized correlation" which is shown, below, in Equation (1). As it may be expected, the 2 normal signals are similar and therefore should have a positive value of the computed correlation. The correlation value between the Reference signal and the Abnormal (3 signal) should be negative because the 2 signals are not similar to a good extent (see the output, below). ... Equation (1) such that ... Equation (2) x and y are the 2 input signals (1-D arrays), and n is their array size (all 3 arrays should have the same size). You are provided with 3 text data files. Each data file has the values of one 1-D array. You may assume a maximum array size 1000. All of the values are real numbers (double). The 3 files have an equal number of values (sizes). However, the number is not provided here in the statement. You should find the size of the data. You should read the files until the end of file is reached (EOF). The 3 file names are "ReferenceECG.txt", "NormalECG.txt", and "AbnormalECG.txt". There are no other experiments or files to read from. You are expected to write your code using Modular Programming. Your code should have at least the following 2 functions: normcorr() takes as input the 2 arrays x andy and their size, and returns the computed value of their normalized correlation, not provided here in the statement. You should find the size of the data. You should read the files until the end of file is reached (EOF). The 3 file names are "ReferenceECG.txt", "NormalECG.txt", and "AbnormalECG.txt". There are no other experiments or files to read from. You are expected to write your code using Modular Programming. Your code should have at least the following 2 functions: normcorr() takes as input the 2 arrays x and y and their size, and returns the computed value of their normalized correlation, using Equation (1). E() takes as input one 1-D array and returns the sum-squared of its elements, using Equation (2). How to interpret your correlation results: If normcorr() function returns a positive value, the 2 input signals have similarity. In this case normcorr() will return a value greater than zero but less than or equal to 1. For example, 0.71. In this case, the similarity between the 2 input signals (1-D arrays) is 71%. If normcorr() function returns a negative value, the 2 input signals have dissimilarity. In this case normcorr() will return a value greater than or equal to -1 but less than zero. For example, -0.33. In this case, the dissimilarity between the 2 input signals (1-D arrays) is 33%. A zero value that is returned by the normcorr() function means that the 2 input signal have no correlation between them, and therefore, no similarity. Expected output after running the code: The correlation between the Reference ECG and the Normal ECG is 0.964719 Therefore, the similarity between the Reference ECG and the Normal ECG is 96.5% The correlation between the Reference ECG and the Abnormal ECG is -0.195468 Therefore, the dissimilarity between the Reference ECG and the Abnormal ECG is 19.5%. Evaluation: Evaluation is based on the completeness of the implementation of the tasks assigned in this homework. For example, there will a substantial loss of points if the instructions are not followed: 1. If code is not modular. 2. If the functions listed, above, are not used. 3. If results are not correct or if code does not compile. ECG (electrogardiogram) signals are signals taken from the human body in order to measure the activity and health of the human heart. An ECG signal shows whether a patient has heart disease (called abnormal signal) or does not have heart disease (normal signal). The figure below shows 3 ECG signals. The top 2 are normal and the third one is abnormal. These signals were taken from real data representing patients at a hospital. ** LEI An ECG signal is represented in the computer using a 1-D array of data. You are to write a program that measures the similarity between 2 ECG (heart) signals. You will measure the similarity of the top signal (Reference - Normal) compared to the bottom two signals. The similarity measure for this homework assignment is the "normalized correlation" which is shown, below, in Equation (1). As it may be expected, the 2 normal signals are similar and therefore should have a positive value of the computed correlation. The correlation value between the Reference signal and the Abnormal (3 signal) should be negative because the 2 signals are not similar to a good extent (see the output, below). ... Equation (1) such that ... Equation (2) x and y are the 2 input signals (1-D arrays), and n is their array size (all 3 arrays should have the same size). You are provided with 3 text data files. Each data file has the values of one 1-D array. You may assume a maximum array size 1000. All of the values are real numbers (double). The 3 files have an equal number of values (sizes). However, the number is not provided here in the statement. You should find the size of the data. You should read the files until the end of file is reached (EOF). The 3 file names are "ReferenceECG.txt", "NormalECG.txt", and "AbnormalECG.txt". There are no other experiments or files to read from. You are expected to write your code using Modular Programming. Your code should have at least the following 2 functions: normcorr() takes as input the 2 arrays x andy and their size, and returns the computed value of their normalized correlation, not provided here in the statement. You should find the size of the data. You should read the files until the end of file is reached (EOF). The 3 file names are "ReferenceECG.txt", "NormalECG.txt", and "AbnormalECG.txt". There are no other experiments or files to read from. You are expected to write your code using Modular Programming. Your code should have at least the following 2 functions: normcorr() takes as input the 2 arrays x and y and their size, and returns the computed value of their normalized correlation, using Equation (1). E() takes as input one 1-D array and returns the sum-squared of its elements, using Equation (2). How to interpret your correlation results: If normcorr() function returns a positive value, the 2 input signals have similarity. In this case normcorr() will return a value greater than zero but less than or equal to 1. For example, 0.71. In this case, the similarity between the 2 input signals (1-D arrays) is 71%. If normcorr() function returns a negative value, the 2 input signals have dissimilarity. In this case normcorr() will return a value greater than or equal to -1 but less than zero. For example, -0.33. In this case, the dissimilarity between the 2 input signals (1-D arrays) is 33%. A zero value that is returned by the normcorr() function means that the 2 input signal have no correlation between them, and therefore, no similarity. Expected output after running the code: The correlation between the Reference ECG and the Normal ECG is 0.964719 Therefore, the similarity between the Reference ECG and the Normal ECG is 96.5% The correlation between the Reference ECG and the Abnormal ECG is -0.195468 Therefore, the dissimilarity between the Reference ECG and the Abnormal ECG is 19.5%. Evaluation: Evaluation is based on the completeness of the implementation of the tasks assigned in this homework. For example, there will a substantial loss of points if the instructions are not followed: 1. If code is not modular. 2. If the functions listed, above, are not used. 3. If results are not correct or if code does not compile.
Expert Answer:
Answer rating: 100% (QA)
Answer 1 The normalized correlation is a measure of the similarity of two ECG signals It is computed by taking the average of the product of the two signals and then dividing by the product of the sta... View the full answer
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
You are to write a critically reflective paper entitled: My Role as a Decision Leader in the Global Marketplace. The purpose of this paper is for you to demonstrate your competency in discussing key...
-
You have been asked to write a program that calculates the total price for a picnic lunch that the user is purchasing for a group of friends. Your program should: Ask the user to enter her budget for...
-
write a program that implements a variant of a linked list. This variant has a dummy node pointed to by the head link as shown in the following figure: Linked list with a dummy first node: item next...
-
What immediate clinical concerns does this client present to the counselor or therapist? Are there sufficient symptoms presented in the case to make a diagnosis of either stimulant and/or alcohol use...
-
What is the difference between the literal and those with an attitude problem? How should each be handled?
-
A smoking lounge is to accommodate 15 heavy smokers. The minimum fresh air requirement for smoking lounges is specified to be 30 L/s per person (ASHRAE, Standard 62, 1989). Determine the minimum...
-
George Tanner died October 2, 2023, survived by his son Thomas and his daughter Gigi Tanner Stewart and her children, Sam and Cindy. George was the sole stockholder of Tanner, Inc., a C corporation....
-
Capitalization of Interest Vania Magazine Company started construction of a warehouse building for its own use at an estimated cost of $5,000,000 on January 1, 2009, and completed the building on...
-
Why does the government intervene in the economy? Explain two ways the government seeks to direct the economy in a mixed economic system like the United States. How can ordinary citizens influence...
-
The whistleblowing aspects of this case were first discussed in the text. What follows is a more comprehensive discussion of accounting and auditing issues. In 2005, Tony Menendez, a former Ernst &...
-
Zambian Co. uses a periodic inventory system. Its records show the following for the month of May, in which 75 units were sold. Units Unit Cost Total Cost May 1 Inventory 36 $6 $216 15 Purchases 29 9...
-
Phonegrip Company manufactures mobile phone holders. Phonegrip currently buys a magnet for its phones for $0.90 per unit. Phonegrips president asked for cost estimates for making this product, and...
-
June and John decide to form a business. They each plan to contribute $20,000 in exchange for a 50 percent interest in the business. They will then take out a bank loan for $30,000 to cover the...
-
Several years ago, Catherines Cattery Supplies signed a contract to deliver 5000 units of a special product each year to one of its customers at a price of $15 per unit. This contract, which runs for...
-
In the 52 years between 1956 and 2008, Warren Buffetts net worth grew from $100,000 to $62 billion. What was his annual rate of return?
-
Refer to the example given in the accounting rate of return (ARR) section of the text (pages 4923), a summary of which is given below. Required: a Calculate the net present value (NPV) of the...
-
1.55. Kobe Bryant For his NBA career the Los Angeles Lakers' Kobe Bryant made 1827 out of 5546 three-point field goal attempts during the regular season. (a) Find the proportion of made three-point...
-
1A. If the researcher is concerned about the number of variables, the nature of the analysis, and completion rates, then, he/she is at which stage of the sampling design process (Figure 11.1 in the...
-
In the text we showed how caching path names can result in a significant speedup when looking up path names. Another technique that is sometimes used is having a daemon program that opens all the...
-
Consider the following state of a system with four processes, P1, P2, P3, and P4, and five types of resources, RS1, RS2, RS3, RS4, and RS5: Using the deadlock detection algorithm described in Section...
-
An extension model used by many programs (Web browsers, Office, COM servers) involves hosting DLLs to hook and extend their underlying functionality. Is this a reasonable model for an RPC-based...
-
Regional trading blocs, such as the EU and NAFTA, are growing in importance. What are the implications of these trading blocs for international businesses? Are they helpful or harmful? How may they...
-
Discuss the role of natural resources and agriculture in Africas economy.
-
What was the total value of U.S. imports from Belgium last year? Of U.S. exports to Belgium? Success in international business often depends on a firm obtaining information about foreign markets so...
Study smarter with the SolutionInn App