79페이지 코드 실행 결과 오류를 해결해 주세요

160 views
Skip to first unread message

Chulwan Park

unread,
Jul 10, 2022, 6:57:01 AM7/10/22
to 머신러닝/딥러닝 도서 Q&A
79페이지 책에 나오는 대로 손코딩
kn.score(test_input,test_target)
 
하고 실행하니, 
오류가 다음과 같이 뜹니다.

ValueError Traceback (most recent call last) <ipython-input-116-d37654a02be0> in <module>() ----> 1 kn.score(test_input,test_target)
2 frames
/usr/local/lib/python3.7/dist-packages/sklearn/metrics/_classification.py in _check_targets(y_true, y_pred) 93 raise ValueError( 94 "Classification metrics can't handle a mix of {0} and {1} targets".format( ---> 95 type_true, type_pred 96 ) 97 ) ValueError: Classification metrics can't handle a mix of continuous-multioutput and binary targets

해결방법을 알려주시면 감사하겠습니다.

Haesun Park

unread,
Jul 10, 2022, 7:40:59 AM7/10/22
to Chulwan Park, 머신러닝/딥러닝 도서 Q&A
안녕하세요. 박해선입니다.

에러 코드만 봐서는 정확히 어떤 문제인지 파악하기 어렵네요.
다음 코랩 노트북의 코드를 실행해 보시고, 작성하신 코드와 비교해 보시면 원인을 찾는데 도움이 되실 것 같습니다.

감사합니다!

2022년 7월 10일 (일) 오후 7:57, Chulwan Park <park.ch...@gmail.com>님이 작성:
--
이 메일은 Google 그룹스 '머신러닝/딥러닝 도서 Q&A' 그룹에 가입한 분들에게 전송되는 메시지입니다.
이 그룹에서 탈퇴하고 더 이상 이메일을 받지 않으려면 ml-dl-book-qn...@googlegroups.com에 이메일을 보내세요.
웹에서 이 토론을 보려면 https://groups.google.com/d/msgid/ml-dl-book-qna/a07d25de-c192-4dff-a06a-a6c914919908n%40googlegroups.com을(를) 방문하세요.
Reply all
Reply to author
Forward
0 new messages