Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Please Homework 6 Continue working in the Caesar project. Normalizing data is useful in many areas. There are also multiple methods of normalizing

image text in transcribedIn Java Please

Homework 6 Continue working in the Caesar project. Normalizing data is useful in many areas. There are also multiple methods of normalizing data (such as in Linear Algebra to make the vector length one, rescaling data to the range of [0, 1], or making the data sum to 100%). This can be useful in a number of areas, for this assignment we will be thinking about comparing histograms where the number of data points is different so comparing counts would be misleading. So we want to convert our histograms from counts to percentages. 1) (15 points) Write a method normalizeArray that takes one argument, an array of integers. This method will return a normalized copy of the array where each bin contains the percentage. public static double[] normalizeArray(int[] inputArray) O To compute this you will need to Create a new double array Add up all of the values of the input array (sum) Divide each array value by the sum and store that in the double array Return the double array O For example this histogram: int[] binsArray = {2,3,4,8,1,2}; Will result in a normalized histogram of: {0.1, 0.15, 0.2, 0.4, 0.05, 0.1} a * * * * b * * * * * * * * * * * * * d * * * * * * * * * * * * * e * * f * * * *

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

a. What is the purpose of the team?

Answered: 1 week ago

Question

a. How are members selected to join the team?

Answered: 1 week ago

Question

b. What are its goals and objectives?

Answered: 1 week ago