MLJ compain TypeError: non-boolean (Nothing) used in boolean context

Hi, I have trouble in understand the error while I do the model evaluate in MLJ package.

I could run succussful with Accuracy or MulticlassFScore measures, but if I add the confusion_matrix measure as below, it will pop an error said: ERROR: TypeError: non-boolean (Nothing) used in boolean context; But I have no idea where is wrong.

My code is here

# scitype for X is Continuous, for y, it is AbstractVector{OrderedFactor{2}}
mach = machine(svm(), X, y) 
evaluate!(mach,
                 resampling=CV(nfolds=5),
                 measure=[Accuracy()])

evaluate!(mach,
                 resampling=CV(nfolds=5),
                 measure=[ConfusionMatrix()])

Thanks for any suggestion!

1 Like