convert prediction to logical