C3_W4_Assignment Exercise 2

Can we pass the argument ‘control_metrics’ to compute_continuous_metrics method as is from the ‘degrees_of_freedom method’?
I get the following error: TypeError: complex() first argument must be a string or a number, not ‘estimation_metrics_cont’

for eg, I am calling the methods as follows. Should I do any data conversion?

c_metrics = compute_continuous_metrics(control_metrics)
v_metrics = compute_continuous_metrics(variation_metrics)

*Following is given (not my code), should’nt the control_metrics and variation metrics be sample data or an array of data?
What am I missing? Any pointers is greatly appreciated. Thanks in advance.

def degrees_of_freedom(control_metrics, variation_metrics):
“”"Computes the degrees of freedom for two samples.

    control_metrics (estimation_metrics_cont): The metrics for the control sample.
    variation_metrics (estimation_metrics_cont): The metrics for the variation sample.

    numpy.float: The degrees of freedom.


Just in case those are currently working on exercise-2, the instructions are a bit confusing. I was trying to call continuos_metrics method inside degrees_of_freedom method. We don’t really need to call that function in this method, as the metrics are provided in the degrees_of_freedom method.


Thanks for your update.