[binary_classifier] xor 연산에 대해 svm.SVC를 이용한 예측

#직접 데이터와 값을 넣고 학습 시키고 이후에 데이터만 넣어서 예측

from sklearn import svm

clf = svm.SVC()

clf.fit([
    [0,0],
    [1,0],
    [0,1],
    [1,1]
], [0,1,1,0])

results = clf.predict([
        [0,0],
        [1,0]
])

print(results)

댓글

이 블로그의 인기 게시물

LSF (GPU 스케쥴링) 명령어 사용법

CentOS 7 리부팅 없이 새 디스크 인식 (find a new disk without reboot)

python에서 hive 사용