Rants about this course, so far

  1. Python versions found are 3.6 & 3.7… 3.12 is about to roll out…An update would avoid this (C3_W1 assignment):
/opt/conda/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
  from numpy.core.umath_tests import inner1d
  1. No DICOM preprocessing
  2. Templated functions cannot be refactored, e.g.:
def add_interactions(X):
    # refactored code not accepted by AutoGrader 
    # despite acknowledging that the function is correct.
    
    from itertools import combinations
    
    X_int = X.copy()
    
    yc = combinations(X_int.columns, 2)
    for (i, j) in yc:
        feat_ij = f"{i}_x_{j}"
        X_int[feat_ij] = X_int[i]*X_int[j]
        
    return X_int
  1. Bar plots for categorical value are vertical: should be horizontal, e.g.:
_ = coeffs.T.plot.barh(legend=None) # dummy assignment to avoid repr output
  1. The (paid?) programmer who wrote this: print(f"Proportion Treated: {p} ~ {int(p*100)}%") does not know the print_format function: print(f"Proportion Treated: {p} ~ {p:.0%}").
  2. All the Hints cells should not be “collapsible” as the info given is often necessary for the grader; removing <details> from the markdown does that.

** AutoGrader quirks**

  • The AutoGrader seems to be using a subset of the Python parser (??). For example, another way the write the code line in 4) above is coeffs.T.plot.barh(legend=None);, but the AutoGrader rejects the trailing semicolon. Example:
    Cell #8. Can't compile the student's code. Error: SyntaxError('invalid syntax', ('/tmp/student_solution_cells/cell_8.py', 17, 1, ';\n'))
  • In C2W3 assignment, the grader fails with a shape error on this assignment: censored = (df["Event"]==0).sum(), but acceptscensored = sum(df["Event"]==0) ??
  • Default values are required: using X.copy() won’t pass!
In Code Cell UNQ_C5, we expected code X = X.copy(deep=True) and could not find it.
1 Like

Thanks for your feedback.