Hi everyone, I am having some trouble in passing one heatmap test for the medical data examination project.
Here is the link to my code:my project so far
and here are the errors I keep getting:
Replit: Updating package configuration
python main.py
/home/runner/boilerplate-medical-data-visualizer-8/venv/lib/python3.8/site-packages/seaborn/axisgrid.py:87: MatplotlibDeprecationWarning: Passing the loc parameter of __init__() positionally is deprecated since Matplotlib 3.6; the parameter will become keyword-only two minor releases later.
figlegend = self.fig.legend(handles, label_order, "center right",
../home/runner/boilerplate-medical-data-visualizer-8/venv/lib/python3.8/site-packages/pandas/core/nanops.py:1415: DeprecationWarning: the `interpolation=` argument to percentile was renamed to `method=`, which has additional options.
Users of the modes 'nearest', 'lower', 'higher', or 'midpoint' are encouraged to review the method they used. (Deprecated NumPy 1.22)
return np.percentile(values, q, axis=axis, interpolation=interpolation)
/home/runner/boilerplate-medical-data-visualizer-8/venv/lib/python3.8/site-packages/seaborn/matrix.py:268: MatplotlibDeprecationWarning: The label function was deprecated in Matplotlib 3.1 and will be removed in 3.8. Use Tick.label1 instead.
fontsize = tick.label.get_size()
.['0.0', '0.0', '-0.0', '-0.0', '-0.1', '0.5', '-0.0', '0.1', '0.2', '0.3', '0.0', '0.0', '0.0', '0.0', '0.0', '-0.0', '0.0', '0.0', '0.0', '0.0', '0.0', '0.0', '0.1', '-0.0', '-0.0', '0.1', '0.0', '0.0', '0.0', '0.1', '-0.0', '-0.0', '0.1', '0.0', '0.0', '0.4', '-0.0', '-0.0', '0.3', '0.2', '0.1', '-0.0', '0.0', '0.0', '0.0', '0.0', '-0.0', '0.2', '0.1', '0.1', '0.0', '0.0', '0.0', '0.0', '0.3', '0.0', '-0.0', '0.0', '-0.0', '-0.0', '-0.0', '0.0', '0.0', '-0.0', '0.0', '0.0', '0.0', '0.2', '0.0', '-0.0', '0.2', '0.1', '0.1', '0.2', '0.1', '-0.0', '-0.0', '-0.0', '-0.0', '0.1', '-0.0', '-0.1', '0.6', '0.0', '0.0', '0.1', '0.1', '-0.0', '0.0', '-0.0', '0.2']
F
======================================================================
FAIL: test_heat_map_values (test_module.HeatMapTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/boilerplate-medical-data-visualizer-8/test_module.py", line 48, in test_heat_map_values
self.assertEqual(actual, expected, "Expected different values in heat map.")
AssertionError: Lists differ: ['0.0[14 chars]0', '-0.0', '-0.1', '0.5', '-0.0', '0.1', '0.2[594 chars]0.2'] != ['0.0[14 chars]0', '0.0', '-0.1', '0.5', '0.0', '0.1', '0.1',[593 chars]0.1']
First differing element 3:
'-0.0'
'0.0'
['0.0',
'0.0',
'-0.0',
- '-0.0',
? -
+ '0.0',
'-0.1',
'0.5',
- '-0.0',
? -
+ '0.0',
'0.1',
- '0.2',
? ^
+ '0.1',
? ^
'0.3',
'0.0',
'0.0',
'0.0',
'0.0',
'0.0',
+ '0.0',
+ '0.2',
+ '0.1',
+ '0.0',
+ '0.2',
+ '0.1',
+ '0.0',
+ '0.1',
'-0.0',
+ '-0.1',
+ '0.1',
'0.0',
- '0.0',
? ^
+ '0.2',
? ^
- '0.0',
- '0.0',
- '0.0',
'0.0',
'0.1',
'-0.0',
'-0.0',
'0.1',
'0.0',
- '0.0',
- '0.0',
'0.1',
- '-0.0',
- '-0.0',
- '0.1',
- '0.0',
- '0.0',
'0.4',
'-0.0',
'-0.0',
'0.3',
'0.2',
'0.1',
'-0.0',
'0.0',
'0.0',
- '0.0',
+ '-0.0',
? +
- '0.0',
+ '-0.0',
? +
'-0.0',
'0.2',
'0.1',
'0.1',
'0.0',
'0.0',
'0.0',
'0.0',
'0.3',
'0.0',
'-0.0',
'0.0',
'-0.0',
'-0.0',
'-0.0',
'0.0',
'0.0',
'-0.0',
'0.0',
'0.0',
'0.0',
'0.2',
'0.0',
'-0.0',
'0.2',
'0.1',
- '0.1',
? ^
+ '0.3',
? ^
'0.2',
'0.1',
'-0.0',
'-0.0',
'-0.0',
'-0.0',
'0.1',
- '-0.0',
'-0.1',
+ '-0.1',
- '0.6',
? ^
+ '0.7',
? ^
'0.0',
- '0.0',
? ^
+ '0.2',
? ^
'0.1',
'0.1',
'-0.0',
'0.0',
'-0.0',
- '0.2']
? ^
+ '0.1']
? ^
: Expected different values in heat map.
----------------------------------------------------------------------
Ran 4 tests in 6.944s
FAILED (failures=1)
I can infer that some values are off and that I have more values than the ones expected by the test. But, I have scrolled through posts relating to this project and my code does not look that different from the code I have seen around in this forum.
I still have not picked upon my mistake though.
Many thanks in advance for your help!