아이리스 꽃 구별하기 모델
데이터에 이름을 붙이는 작업 = 라벨링(시간,돈이 많이 든다)
Logistic Regression = 중간 선을 가지고 그룹을 나누어 분류
Test and Score, Confusion Matrix 평가지표
①Precision(정밀도) = true라 분류한 것 중 실제 true인 비율
②Recall(재현율) = 실제 true인것 중 모델이 true라 예측한 비율
③F1 score = Precision, Recall 조화평균
④Accuracy(CA, 정확도)
⑤AUC = ROC 그래프 아래의 면적, 여러 임계치들 기준, Recall fallout의 변화를 시각화
(fallout = false인 data중 모델이 true라고 예측한 비율)
CA = 100%인 모델?
=> 새로운 데이터에 대해서는 형편없을 수 있다
=> 너무 딱맞을 때 overfit
=> 너무 클 때 underfit (학습 자체가 너무 떨어진다)
cross validation
=> 표본 데이터의 크기가 작을 때 사용
=> subset = 지정 단위로 쪼개서 숫자를 매겨 각각을 테스트, 각각 결과를 대조 결합 결론
import requests
import matplotlib.pyplot as plt
from PIL import Image
from io import BytesIO
import json
subscription_key = '234a97e32f8447c19fbf3836053ff32c'
vision_base_url = 'https://daeguaivision00.cognitiveservices.azure.com/vision/v2.0/'
analyze_url = vision_base_url + 'analyze'
image_url = 'https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&fname=http%3A%2F%2Fcfile22.uf.tistory.com%2Fimage%2F2129B94155A18E78060049'
response = requests.get(image_url)
image = Image.open(BytesIO(response.content))
image