Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I am trying to write a python program which takes one command line argument i (i [2, 29]) (and the data file) and computes

Hello! I am trying to write a python program which takes one command line argument i (i [2, 29]) (and the data file) and computes the following values for the i-th attribute of the dataset: N (number of objects), min, max, mean, standard deviation, Q1, median, Q3, and IQR.

I have a .csv file which contains energy data from: http://archive.ics.uci.edu/ml/machine-learning-databases/00374/

I have a template formatted so that:

def calcAttributes( file, ithAttr): # Default value of 0,infinity,-infinity are assigned to all the variables as required.

numObj, minValue, maxValue, mean, stdev, Q1, median, Q3, IQR = [0,"inf","-inf",0,0,0,0,0,0]

return numObj, minValue, maxValue, mean, stdev, Q1, median, Q3, IQR

In this function, I am trying to assign the values to the respective variables, utilizing the data set. However, I have no idea how to begin going about it. Any help would be greatly appreciated.

I do not just want the solution to this issue, a description of what each line does/ why it is important would really help me to understand what is going on in this code. (could just be commented into the code or whatever works best)

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

Step: 3

blur-text-image

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

What are the main purposes of a budget?

Answered: 1 week ago