Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java code please. Please help Objective 1: Bayesian Average Your first objective in this project is to compute the Bayesian average for a given list
Java code please. Please help
Objective 1: Bayesian Average Your first objective in this project is to compute the Bayesian average for a given list of ratings. The Bayesian average is computed by adding a fixed number cf extra ratings at a certain value to the existing ratings Background By comparing items based on their Bayesian average, as opposed to directly using the average of all review scores, we can improve the usefulness of these comparisons. For example, in a 5 star rating system an item with 1 rating of 5 stars will be ranked higher than an item with 200 ratings at an average rating of 4.9. Most likely we would prefer the later item since we can be more confident that it is a highly rated item since there are 200 opinions being considered. To address this we can rank the items by their Bayesian rating and choose 5 extra ratings of 3 stars to be added to each item. Now the first item has 1 rating of 5 and 5 ratings of 3 for a Bayesian average of 3.33 and the second item has 200 ratings at an average of 4.9 and 5 ratings of 3 for a Bayesian average of 4.85 Bayesian averages can be used in this way to lower ratings where there is not enough information to make a judgment on the item Tasks Setup the structure for this project and write a method to compute the Bayesian average of a list of ratings. 1. Create a new project in Eclipse that will contain you work for all 5 objectives 2. Create a new package in the src folder named "ratings" 3. In the ratings package, create a new class named "Main" and write a main method in this class. This class will be the entry point for the project and will be the only class with a main method. You should use this class to test your project 4. Create a class named "RatingsAnalyzer" in the ratings package. In this new class, write a public static method named "bayesianAverage that takes three parameters (an ArrayList of Doubles, an int, then a double) and returns a double. The first parameter represents all the ratings for a particular item, the second parameter is the number of additional ratings to add, and the third parameter is the value of these additional ratings. The return value is the bayesian average of these ratings based on these parametersStep 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