logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Rajat AahujaEnglish
(5/5)

892 Answers

Hire Me
expert
Jason RoyComputer science
(5/5)

787 Answers

Hire Me
expert
Garima ThakurFinance
(5/5)

799 Answers

Hire Me
expert
Mason RamirezzTechnical writing
(4/5)

852 Answers

Hire Me
Others
(5/5)

Write an class mydata that takes in a vector of numbers and has the methods

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

 

In a single jupyter notebook file named hw2.ipynb create the following:

1. A sorting hat program that, when run, takes in a series of simple Y or N answers and returns your Hogwart's house.

2. Write an class mydata that takes in a vector of numbers and has the methods: mean and std (for standard deviation) returning the mean and standard deviation respectively. This should calculate the mean and standard deviation without using numpy.

3. Create a lag function as follows. It takes in a numpy vector, say a = numpy.array( [1, 6, 8, 4]) and an integer > 0. It then returns the list lagged by the integer value. So, lag (a, 1) will return [nan, 1, 6, 8] and lag(a, 2) will return [nan, nan, 1, 6]. That is, it gets rid of n values at the end and appends that many nan s at the beginning. Use numpy 's nan for the missing values. It should return a numpy array.

4. Using your code from 3, write a function that returns a function that lags by a specific amount. So, for example, if we name the function lagGenerator then lagGenerator (2) creates a function that lags by 2.

 

 

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme