Write a short function named display_ratings

Assignment Help Basic Computer Science
Reference no: EM133095185

Project

The Problem

Inspired by Jonah Hill's character in the movie Moneyball, you have decided to take up sports analytics as your retirement activity, following a successful career selling widgets in the mall on Namek. Eight players are competing to become the Go Fish Champion of Namek. Figure 1 shows the draw for a single-elimination tournament that will decide the champion. Single-elimination means the loser of each matchup exits the tournament.

Your task in this project is to predict the most likely winner of the entire tournament. You will make use of Arpad Elo's rating scheme. This system is also how international chess ratings are derived and form the basis of a lot of sports prediction models, like those used by FiveThirtyEight) to pick the likely winner. Here are some major assumptions involved.

- Each player is assumed to have a certain skill level (given by a number often denoted by s). This quantity is unknown and cannot be directly measured. Below, we will learn to infer this value from historical Go Fish match data.
- We assume that a player's skill level does not change over time.
- When two players A and B with skill levels sa and sb, respectively, compete, the probability of player A winning is impacted by the difference in skill levels defined as δ = (sa sb)/c. The value c in the expression is a scale parameter: it describes how sensitive the win-loss probability is to the difference in skill levels. For our purposes, we'll select c = 100 for this entire assignment. A formula which expresses the probability that player A wins is given below:

P(A wins) =  eδ/1+ eδ

- Every match played has exactly one winner; the outcome can never be a tie.

Task 1: YOU will first obtain an estimate of each player's skill level by writing a FUNCTION named calculate_ratings, which takes as INPUT a "past matches" filename that indicates a file in the format of past_matches.csv file described above.

Task 2: Next, write a short FUNCTION named display_ratings which takes as INPUT a dictionary containing 8 entries where keys are the player names and the VALUES are the ratings for the players (i.e., it takes as INPUT the dictionary yOUR calculate_ratings FUNCTION RETURNS). It SHOULD both generate to the console and save to a file named projections.pdf a bar graph displaying the
ratings of each player.

Task 3: Next, write a FUNCTION named project_win_probs that will repeat- edly SIMULATe the completed TOURNAMENT based on the bracket shown in Fig- URE 1.

Task 4: Next, write a short FUNCTION named display_probs that takes as INPUT a dictionary of the style OUTPUT by yOUR project_win_probs FUNCTION, and generates two OUTPUT files. The FUNCTION does not RETURN a VALUE, BUT it will also display a plot on the screen.

Attachment:- Projects.rar

Reference no: EM133095185

Questions Cloud

Habits of highly effective employees : List AND Explain the 7 Habits of Highly Effective Employees.
Developing an employee database in zoho creator : Your manager asked you look at the sum of employee salaries over the past five years. "Can you tell me the sum we will be paying employees in 2025?"
How much of the monthly rental expense : How much of the monthly rental expense should be allocated to a department that occupies 10,000 square feet on the second floor
Training and development plans for employees : A large Hong Kong food manufacturing company found that many frontline workers and line leaders had not updated themselves in using new production technologies.
Write a short function named display_ratings : Write a FUNCTION named project_win_probs that will repeat- edly SIMULATe the completed TOURNAMENT based on the bracket
Prepare the cash receipts section of the cash budget : She predicts that April, May and June will generate $150,000, $120,000 and $135,000 worth of sales, Prepare the cash receipts section of the cash budget
What lessons that you have learnt from the case study : What lessons that you have learnt from the case study? Why?
Simplify and communicate compensation strategies : Lead a discussion with the relevant literature (theories) as to: How can compensation maps be used to simplify and communicate compensation strategies to leader
Identify schein four key elements in organization structure : Think of an organization that you're a part of. It could be a workplace, team, or club. Identify Schein's four key elements in the organization's structure:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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