cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

`None` type values not converted to np.nan for Regression and Machine Learning #109

Closed cutright closed 3 years ago

cutright commented 3 years ago

There has been a long-term bug where multi-variable regressions and machine learning would crash if a variable contained a None type value, as opposed a str value of 'None'.

https://github.com/cutright/DVH-Analytics/blob/84a34b01d7faacab5916574334f6dc66ba2010e9/dvha/tools/stats.py#L224

Starting in DVHA v0.8.9, this line has been changed to: x_var_data.append([value, np.nan][str(value).lower() == 'none'])