check prediction case, using pinv instead of inv calls.