Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 1 Point: create a special data structure that will be a list of numbers Each of the lists called a calculationList will have two

Part 1
Point: create a special data structure that will be a list of numbers
Each of the lists called a calculationList will have two main parts
* List of numbers
* a threshold value
The threshold values is a limit for whatever type of calculation the list belongs to
Example: for stdList, the threshold applies to the standard deviation. For meanList, the threshold applies to the mean etc.
The calculation list should have a prune () method that will start removing values from the list until the relevant value is below the threshold.
Each type of calculation list will have a different way of figuring out what to remove as the most important values should be removed first >
Most important meaning if standard deviation is greater than the threshold, and we have a value that is 3 standard deviation away from the mean and another that is 10 standard deviations away from the mean we want to remove the second valve first as it will be the most impactful
PLEASE CREATE CLASSES USING PYTHON
A calculationList class that is made up of a list of float numbers as well as a few additions
* This class will
* Inherit from two things - the mutable sequence class and the ABC class
Mutable sequence class: allow us to use the list methods
ABC class: allow us to use the abstract methods
The calculation list will be a base class that will not be implemented directly. Next will need to create some subclasses that then inherit from the calculationList class
PLS CODE the following in python using numpy
* stdList - this will be a calculationList that will prune values based on the standard deviation of the list
* meanList - this will be a calculationList that will prune values based on the mean of the list
* sumList - this will be a calculationList that will prune values based on the sum of the list
Each of these classes should only add what they need to make their unique functionality work
The things that are common to all of them should be calculationList class. The other classes should be children of that class, each adding ether own unique parts
NOTE: there may be erroneous values in the input data, so there should be some error checking to deal with broken inputs - of the row has erroneous data, that row should be skipped entirely
Example of input csv file contents
Name Type Threshold Value_0 Value_1 Value_2
list_0 stdList 30.1960925065
list_1 stdList 37.8329769355
list_2 meanList 42.901578392
Example of output file contents (what we tryna do)
Name Length Threshold Value
list_0530.196019
list_1937.832929
list_24542.901542
Starting point
Part 2
Write a code that reads a csv file using the code classes above
Some criteria:
# - read data from disk, and create a list of the calculation lists.
# - process those lists to get actual outputs.
#outputs = processCalculationLists(calculationListLoader("inputs.csv"), output_file="output.csv")
#outputs.head()
Example files above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

State the uses of job description.

Answered: 1 week ago

Question

Explain in detail the different methods of performance appraisal .

Answered: 1 week ago

Question

Why do mergers and acquisitions have such an impact on employees?

Answered: 1 week ago

Question

2. Describe the functions of communication

Answered: 1 week ago