Showing the Right Numbers and Visuals Library Paper

Description

According to the author, ‘ggplot is an implementation of the grammar of graphics’ which is a set of rules for producing visualizations of data. In this first plot, we will track the trajectory of life expectancy over time for each country in the data.

  1. map year to x and lifeExp to y.
  2. use geom_line to show how lifeExp changes over time. (did you notice a mistaken assignment to the y parameter in the book?)
  3. use grouping to make each line refer to a specific country in the dataset
  4. facet the data on continent
  5. try moving the facets around on the page – 5 across and 5 down
  6. add a smoother, change the y scale to a log scale and add the dollar sign
  7. add the labels as described in the book
  8. try using facet_grid
  9. be sure that you know what categorical variables, ordered and unordered, are. compare continuous variables.
  10. use the glimpse function on the gss_sm data set. Try this gss_sm %>% glimpse(). What do you think the pipe operator (%>%) does?
  11. make a smoothed scatterplot of the relationship between age of the respondent and the number of children. What did you learn?
  12. facet the result with the sex and race of the respondent (person who respond to the survey)
  13. experiment with the alpha attribute
  14. experiment with combining attributes in the facet wrapper
  15. geom_bar uses count by default
  16. describe how the geom_bar used the count function to determine how much water had been used.
  17. Use the prop function and group by ‘1’ to show by region
  18. show just the religion column in a table
  19. create a bar chart showing the frequency of religious distribution in the data
  20. use fill to highlight the different religions
  21. create a stacked bar chart to show the frequency of religions by region
  22. use the position = dodge attribute to create individual religious frequency bars
  23. facet the religious frequency chart by region
  24. create a histogram showing midwest regions by size
  25. experiment with the number of bins in the previous histogram
  26. Where does the count variable come from?
  27. use subset to show the data in a histogram just from Ohio and Wisconsin
  28. create a kernel density plot of the area of the midwest states

Submit a Word document by Sunday at midnight with screen shots of your work and text. Explain what each image is.

Submit screenshots of your successful installation.

Thomas Edison State University Graphs and Explanations Worksheet

Description

OVERVIEW

You are required to complete a project on modeling in two parts. In the first part you are to write a mathematical model for a given scenario and study its asymptotic behavior. The second part will have you pick a specific case and carry out linear stability analysis of the model you wrote. The final report will include the description of the model, some calculations, and analysis of the results of the models.

SCENARIO AND PROBLEM STATEMENTS

Consider the dynamics of public opinion about political ideologies.

For simplicity, let’s assume that there are only three options: Republican, Democrat, and Independent. Republican and Democrat are equally attractive (or annoying, maybe) to people, with no fundamental asymmetry between them. The popularities of Republican and Democrat ideologies can be represented by two variables, pr and pd, respectively (0 ? pr ? 1; 0 ? pd ? 1; 0? pr + pd ? 1). This implies that 1- pr – pd = pi represents the popularity of Independent. Assume that at each election poll, people will change their ideological states among the three options according to their relative popularities in the previous poll.

For example, the rate of switching from option X to option Y can be considered proportional to (pY – pX) if pY > pX, or 0 otherwise. You should consider six different cases of such switching behaviors (Republican to Democrat, Republican to Independent, Democrat to Republican, Democrat to Independent, Independent to Republican, and Independent to Democrat) and represent them in dynamical equations.

  1. Complete a discrete-time mathematical model that describes this system, and simulate its behavior. See what the possible final outcomes are after a sufficiently long time period. (Hint: Revise Code 4.13 and use.)

For a specific case of pX, pY, and pZ:

  1. Find equilibrium points.
  2. Calculate the Jacobian matrix at each of the equilibrium points.
  3. Calculate the eigenvalues of each of the matrices obtained above. (Hint: Revise Code 5.6 and use.)
  4. Based on the results, discuss the stability of each equilibrium point.
  5. Why is an all Independent state (electorate) not feasible?
  6. Give one major cause of change of state of convergence (Democrat or Republican) from election to election in the context of this model.

Python Collaborative Recommender System Project

Description

Please use the Movielens dataset (you can find it here, see notes below about the data) and use the data to:

  1. Create a collaborative filter recommender system
  2. After implementing step 1, you will have a train and test dataset. Build a graph for each of the train and test datasets in which users, movies and their genres are connected. In this graph, each user, each movie and each genre has a node representing them. If user A has a rating for movie B then there is an edge in the graph connecting them. Also, if movie B has two genres: Action and Drama, then node B will be connected to nodes Action and Drama. Edges in this graph have no edge weights and no edge directions (this is an unweighted, undirected graph)
    1. What is the movie with the highest degree of centrality in train and in test datasets separately? (you choose which centrality metric is best in this case)
    2. What is the genre with the highest degree of centrality in train and in test datasets separately? (you choose which centrality metric is best in this case)
    3. use your recommender system to predict the ratings for the test dataset. Build a graph for the predictions and answer question 2.2 and 2.1 for this dataset as well

    PS: Build only Collaborative Recommender System

  3. NOTES below:
  4. When you go to the dataset link, there are 2 datasets, one small (named ml-latest-small.zip) and one a larger, more realistic dataset (named ml-latest.zip). The former is small and your model will suffer from lack of data, don’t use it. The latter is large and so may push your compute power depending on the machine you’re using. The best approach is to use the larger dataset and downsample it. How you do the downsampling, the ratio and the methodology is up to you (you will be asked about your choices during the presentation)
  5. Feel free to give insights in comments in Jupyter Notebook

YOU DONT HAVE TO DO THE ENTIRE CODE. ONLY WORK ON QUESTIONS 2.1 and I will provide the dataframe and training and testing of it as well.

Mini VGG Network Structure Project

Description

Use google colab ipnyb or jupyter notebook for each experiment on one model variant. Name the files as minivgg, var1, var2 and var3 and var4.

Implement a mini-vgg network and several of its variants. Train and test the models on the cifar-10 dataset (https://www.cs.toronto.edu/~kriz/cifar.html ). Investigate and compare the performance of the variants to the original model. Write half to one page to 1) summarize your experiment results and discuss 2) the classification performance of the models

as well as 3) their size (# of parameters) and 4) the computation time to train them.

Mini-VGG network structure:

Layer Type(window size) – n filters

1 Conv3 – 64

2 Conv3 – 64

3 Maxpool – 2×2

4 Conv3 – 128

5 Conv3 – 128

6 Maxpool – 2×2

7 Conv3 – 256

8 Conv3 – 256

9 Maxpool – 2×2

10* fully Connected 512

11** soft-max

* Note your need a reshape layer before this layer to reshape the data

** Use cross entropy loss (torch.nn.CrossEntropyLoss or tf.nn.softmax_cross_entropy_with_logits()) feed

the loss function with the logits before softmax activation but get the prediction for accuracy after

softmax activation)

Report the performance of each network by doing the following:

A) Plot training loss vs validation loss

B) Plot training accuracy vs validation accuracy

C) Calculate test accuracy

1. Implement the mini-vgg model and report its performance. Use ReLU activation function for all the all conv/fc layers except the last one.

2. Variant 1: Change the ReLU activation functions to SELU and Swish. Would the performance improve?

3. Variant 2: Remove the maxpool layers. Using stride=2 in the conv layer before the maxpool to achieve similar size reduction. Would the performance improve?

4. Variant 3: Add a few dropout layers in the model. Would the performance improve? Try 2 different ways to add the dropout layers. Describe the ones you tried and their performance.

5. Variant 4: Remove layers 9 and 10. Add two layers of (1, 1) convolution: conv (1, 1) x 128; conv (1, 1) x10. Then add “GlobalAveragePooling2D” to merge feature maps before pass them to softmax. This is an all-convolutional structure (no fully connected layers).

Pennsylvania State University Penn State Main Campus Website Code

Description

Create a website according to the following specification

1. Create a home page about yourself.(The name is Allison)
2. Create links to the following pages
a. Coin tossing game (JavaScript)
b. Use the Date function to display the current date on the page (JavaScript)
c. Use the Date function to calculate and display how many days are left for July 4,
2022 (Independence day) on the page. You need to modify the attached program
as discussed in class (date1.html) (JavaScript)
d. A currency converter to convert US dollars to Canadian dollars (JavaScript, 2 part
form). Use the following exchange rate. Canadian_dollar = 1.3*US_dollar
e. Information about 3 places you would like to visit
2. Have a look at the attached page picture(links1.html), which was discussed in class and
modify it to create links to your five favorite websites. (JavaScript)
3. Do a research on the Internet about the recent developments in the area of web
technology (node.js) and put your response in a word document and create a link to it
from your home page and submit it (approx 200 words). You should submit your home
page and all the other pages mentioned above to the Instructor. You should put all the
pages in a folder and submit it.

4. Do a research on the Internet about MySQL database and put your response in a word
document and create a link to it from your home page and submit it. (Approx 200 words)
You should design the pages appropriately adding images, graphics and appropriate
colors and design to make the pages attractive and presentable. Also appropriate data
validation should be performed on the data entered.

Javascript Worksheet

Description

Hide Assignment Information

1. Lab

Script 1:

This script tests the users browser to see which one they are using. Adapt this script to do two other things:

1. If the browser is Chrome, alert “Ah ha, I see that you are using Chrome”

2. Also test to see if the user is using Mac, Windows, or something else.

<script>

var browser = navigator.userAgent;

console.log(browser)

if (browser.indexOf(“Firefox”) > -1) {

alert(“Ah ha, you’re using Firefox!”);

}

</script>


Script 2:

This script checks to see if the user mouses over the Header text, and if they do, it changes the text that they see on the screen. Add to this script two new HTML elements, like an <A href or an <IMG (or any other block level element), and a block of text wrapped in a <P>. Attach an “onClick” method to the first tag, so that when it is clicked, the text inside the <P> tag changes.

<html>

<head>

<title>My page</title>

</head>

<body>

<script>

function changeIt() {

document.getElementById(“header”).innerHTML=”This is the new header text”;

}

</script>

<h1 id=”header” onMouseOver=”changeIt();”>This is the header</h1>

<p>This is the body text</p>

</body>

</html>


2. FORUM:

In the groups where you discussed the four pillars of OOP, I have placed a video. After you watch the video, consider how the creator of the video uses one metaphor throughout the whole video to explain the concepts.

Review what each member contributed to the discussion last time, identify any missing parts (like a missing pillar, for example), and then together, decide on one metaphor that you can use to explain all of the concepts. Create a final post that offers this one, complete metaphor in the group discussion board called “SESSION 12: OOP Explanation”


York Tech C# Programming Person and Customer Classes

Description

I need help combining the two projects below and submitting them as one single application project 

Using Windows Form Visual Studio 2019. C#

Person and Customer Classes

Design a class named Person with properties for holding a person’s name, address, and telephone number. Next, design a class named Customer , which is derived from the Person class. The Customer class should have a property for a customer number and a Boolean property indicating whether the customer wishes to be on a mailing list.  Demonstrate an object of the Customer class in a simple application.

PreferredCustomer Class

A retail store has a preferred customer plan where customers can earn discounts on all their purchases. The amount of a customer’s discount is determined by the amount of the customer’s cumulative purchases in the store as follows:
• When a preferred customer spends $500, he or she gets a 5 percent discount on all future purchases.
• When a preferred customer spends $1,000, he or she gets a 6 percent discount on all future purchases.
• When a preferred customer spends $1,500, he or she gets a 7 percent discount on all future purchases.
• When a preferred customer spends $2,000 or more, he or she gets a 10 percent discount on all future purchases.
Design a class named PreferredCustomer , which is derived from the Customer class you created in Programming Problem 4. The PreferredCustomer class should have properties for the amount of the customer’s purchases and the customer’s discount level. Demonstrate the class in a simple application.

I would prefer the application to be interactive and use a TabControl to make it interactive and use a similar coding to what I’m use to so I can use it as a reference for my final project.

SQU Programming Java Tasks

Description

Task 3:

eXtra is a great Services providing different items to customer. Consider that a customer is

buying any four types of items from eXtra store, where each items has a fixed price on it. After choosing

the items, the customer has to go to the cashier and can ask any of the following services:

Please note that you have to choose the four items of your choice with some appropriate prices

available in the eXtra store.

1. Make a new purchase: The cashier enters the number of items for each type of items then the

program calculates the total price, apply a VAT of 5% and displays the total amount to pay the

customer.

2. Check the price of one item: The cashier enters the code of the item and the program displays

its price.

You are requested to write the Java program that completes the following:

a) Displays the menu of services as specified above and asks the user of his/her service choice.

b) Based on the customer choice, the program executes one of the tasks specified in the previous

list of services.

i. Make a new purchase.

ii. Check the price of one item

iii. Displays an error message if the choice is not one of the previous options.

Please note that you have to choose the four products available in the retail store with their prices.

Please find below some examples of execution: (Photos attached)

__________

Draw a Flow Chart for the senario given in task 3, the diagram must be drawn using suitalble software.

University of Central Missouri C++ Program Project

Description

  1. Write a C++ program that reads in the length and width of a rectangle and prints the area and the perimeter of that rectangle. Area of a rectangle is equal to the length multiplied by the width. The perimeter of a rectangle is equal to the sum of all sides.
  2. Write a C++ program that calculates gross pay. The program should read in the number of hours worked and the hourly rate. If the employee has worked more than forty hours then they should receive time and a half for everything over 40 hours. Print out the gross pay for the employee.
  3. Write a C++ program that reads in three numbers and prints the largest of the three values.
  4. Write a C++ program that computes a 6% tax on a sale when the amount of the sale is input by the user. The program should print the total tax and then the total amount of the sale (original amount + tax).

To submit the homework you need to include only the following in a compressed zip file:

1.A .cpp with the source code for question one.

2.A .cpp with the source code for question two.

3.A .cpp with the source code for question three.

4.A .cpp with the source code for question four.

5.One Microsoft word file that contains images of your programs running. Please see lab 1 for how to create the images.

Sørensen Dice Coefficient Algorithm Project

Description

Using the Sørensen-Dice coefficient algorithm (https://en.wikipedia.org/wiki/Dice%27s_coefficient)

You must create a combosquatting detector that aims to find the similar names % rate of a domain and compare to the other domain with in the domain lists provided from a txt file.

You must be able to insert the domain in mind and then its compared to a list of other domain that are in .txt file. after that it must print the dice similarity rate and the string it has been compared to. The required to be done is to drop the tld; that is the www and the .com or .net or any other thing and compare what is in between. Example: www.xxx.com I want to compare xxx with the other xxx from the list of websites, www.xxx.net or www.cxx.com with www.xxx.com and like that. After that it must save the result into a new txt file.

the result should be something like: www.xxx.com and www.xxx.net has a similarity rate of: xx% and so on.

this implementation should be in parallel and in single python documented commented file. You must not use any API and instead implement the Sørensen-Dice coefficient algorithm directly.

You must check first which of the domians are less in length and then jump into the compare, just so that is not so expensive when dealing with huge list.