Hi,
I wrote the code, it runs, I get the right numbers but with error:
Original Data
Age Systolic_BP
1824 -0.912451 -0.068019
253 -0.302039 1.719538
1114 2.576274 0.155962
3220 1.163621 -2.033931
2108 -0.446238 -0.054554
Data with Interactions
Age Systolic_BP Age_&_Systolic_BP
1824 -0.912451 -0.068019 0.062064
253 -0.302039 1.719538 -0.519367
1114 2.576274 0.155962 0.401800
3220 1.163621 -2.033931 -2.366725
2108 -0.446238 -0.054554 0.024344
Error: Data-type mismatch.
Error: Wrong shape.
Error: Wrong output.
0 Tests passed
3 Tests failed
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-22-b48c1dac61da> in <module>
1 ### test cell ex4: do not edit this cell
----> 2 add_interactions_test(add_interactions, X_train)
~/work/W1A1/public_tests.py in add_interactions_test(target, X_train)
196 ]
197
--> 198 multiple_test(test_cases, test_target)
~/work/W1A1/test_utils.py in multiple_test(test_cases, target)
121 print('\033[92m', success," Tests passed")
122 print('\033[91m', len(test_cases) - success, " Tests failed")
--> 123 raise AssertionError("Not all tests were passed for {}. Check your equations and avoid using global variables inside the function.".format(target.__name__))
AssertionError: Not all tests were passed for test_target. Check your equations and avoid using global variables inside the function.
Not sure what I'm doing wrong...