10. DataConversionWarning: A column-vector y was passed when a 1d array wa…
페이지 정보
작성자 관리자 댓글 0건 조회 4,933회 작성일 20-08-08 15:10본문
# vi train1.py
clf = LogisticRegression()
clf.fit(x, y)
[root@localhost api]# python3 train1.py
/usr/local/lib/python3.7/site-packages/sklearn/utils/validation.py:73: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().
# vi train1.py
clf = LogisticRegression()
clf.fit(x, y.values.ravel())
[root@localhost api]# python3 train1.py
에러가 없어졌을 것이다.
댓글목록
등록된 댓글이 없습니다.