Answered step by step
Verified Expert Solution
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
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started