def predict(self, X):
        X = np.asarray(X).reshape(1,-1)
        sys.stdout=StringIO() 
        p_lbl, p_acc, p_val = svm_predict([0], X.tolist(), self.svm)
        sys.stdout=bkp_stdout
        predicted_label = int(p_lbl[0])
        return [predicted_label, { 'p_lbl' : p_lbl, 'p_acc' : p_acc, 'p_val' : p_val }]
Args:
dataset/ETHPy150Open bytefish/facerec/py/facerec/classifier.py/SVM.predict