Hello!
I saw the using sklearn.Kneighbour classifier with face_recognition example. It works great, but I want to use Classifier from xgboost library to get my face recognition system more accurate.
I tried to modificate some example code to use XGBClassifier, but it generates following WARNINGS and does not recognition anything.
WARNINGS like this:
Warning (from warnings module):
File "C:\Program Files\Python36\lib\site-packages\sklearn\preprocessing\label.py", line 151
if diff:
DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
But, original code works well.
I'm attaching my code. Most likely, the problem inside the "predict" function.
Please, help me. Sorry for my terrible English, I am Ukrainian.
I think that you can ignore the warning. It is caused by sklearn not by your model !
import warningswarnings.filterwarnings(action='ignore', category=DeprecationWarning)
Hello! I saw the using sklearn.Kneighbour classifier with face_recognition example. It works great, but I want to use Classifier from xgboost library to get my face recognition system more accurate.
I tried to modificate some example code to use XGBClassifier, but it generates following WARNINGS and does not recognition anything.
WARNINGS like this: Warning (from warnings module): File "C:\Program Files\Python36\lib\site-packages\sklearn\preprocessing\label.py", line 151 if diff: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use
array.size > 0
to check that an array is not empty.But, original code works well.
I'm attaching my code. Most likely, the problem inside the "predict" function. Please, help me. Sorry for my terrible English, I am Ukrainian.
Link to code: https://pastebin.com/Ceiqr3wN