hundredblocks / concrete_NLP_tutorial

An NLP workshop about concrete solutions to real problems
1.08k stars 446 forks source link

On def get_metrics(y_true, y_predicted): Error #3

Open mrdeds opened 6 years ago

mrdeds commented 6 years ago

@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 commented 6 years ago

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