Question: I need python code. I will give a thumbs up for correct and fast solution. It will be great if you can include screenshots of
I need python code. I will give a thumbs up for correct and fast solution. It will be great if you can include screenshots of the code. Thanks for your time
aggTime = [0.12, 0.18, 0.42, 0.90, 2.10, 6.00, 18.00, 42.00]
aggSize = [115, 130, 202, 335, 510, 890, 1700, 2600]
a)Plot aggTime vs aggSize on a graph using matplotlib.
b) On the same graph you created in a), add a second plot which shows ln(aggTime) vs ln(aggSize)
c) Use an appropriate curve fitting algorithm from scipy to find a linear fit to ln(aggTime) and ln(aggSize). That is, you will make a line fit to the logarithms of the data. Find the slope and intercept of the line equation and print them as screen output.
d) Draw the line you found in c) on to the second graphics to see if it fits to data nicely.
e) Write a Python function named estimateSize which takes a time value in seconds and returns the corresponding estimated aggregate size. You are required to pass slope and intercept values to the function as additional parameters and manually calculate the size. Do not use any scipy/numpy or other methods here.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
