concrete_NLP_tutorial icon indicating copy to clipboard operation
concrete_NLP_tutorial copied to clipboard

On def get_metrics(y_true, y_predicted): Error

Open mrdeds opened this issue 7 years ago • 1 comments

@hundredblocks captura de pantalla 2018-01-31 a la s 18 22 14 captura de pantalla 2018-01-31 a la s 18 22 07

ValueError: Classification metrics can't handle a mix of continuous and multiclass targets

mrdeds avatar Feb 01 '18 00:02 mrdeds

Solved! There are some elements that are Nan on y_test and/or y_predicted_counts. I tried something like this: def nanToZero(nanlist): newlist=[0 if math.isnan(x) else x for x in nanlist] return newlist

mrdeds avatar Feb 01 '18 16:02 mrdeds