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

  Opportunity to ford motor company

Identify environmental and industry influences that should be a concern or present an opportunity to Ford Motor Company. Provide a rationale for your response.

  Human and nature dynamics (handy) model

This paper is centered around some results obtained from the Human and Nature Dynamics (HANDY) model. This model is equation 3 in their paper.

  Define each of the following data mining functionalities

Give examples of each data mining functionality, using a real-life database that you are familiar with.

  How many iteration the algorithm did till finds best cluster

Choose the third strategy by using the Farthest point as the centroids. How many iterations the algorithm did till it finds the best clusters?

  Continues to be a great source of diverse

"New York City continues to be a great source of diverse, world-class talent - that's what brought Google to the city in 2000

  Create a program that will store results of your dice game

Create a program that will store the results of your dice game in a comma separated value file (filename.csv). You will use the Formatter API to construct a new file.

  Project manager of project to develop comprehensive policy

Assume the role of project manager of project to develop comprehensive policy for managing pedestrian traffic flow in popular downtown metropolitan district

  What is billcutterz business model

1. What is Billcutterz' business model? Briefly elaborate on the components of this model.

  Greater automation of global commerce function

Submit a marketing plan that uses Blockchain to prevent "over-serving" and allows for greater automation of the global commerce function.

  Well-constructed comments explaining each section of code

Uses well-constructed comments explaining each section of code. Asks a user if they want to monitor an animal, monitor a habitat, or exit

  Random from a standard 52-card deck

A card is drawn at random from a standard 52-card deck. A deck of cards has 52 cards and four suits (hearts, diamonds, spades, and clubs).

  Computers and troubleshoot problems

Discuss the following and remember we're learning how to work on computers and troubleshoot problems. We are the computer experts. There's no one for us to call, we are the ones people call! Don't rest until you have a thorough paragraph that show..

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