강의

멘토링

커뮤니티

Inflearn Community Q&A

goodlucky12158445's profile image
goodlucky12158445

asked

[Revised Edition] The Complete Guide to Python Machine Learning

Understanding sentiment analysis and practicing sentiment analysis of IMDB movie reviews based on supervised learning

10:25 질문드립니다!

Written on

·

285

0

X_train이 아닌, X_train['review']라고 작성하는 이유가 뭔지 궁금합니다ㅜㅜ

통계머신러닝 배워볼래요? python

Answer 5

1

dooleyz3525님의 프로필 이미지
dooleyz3525
Instructor

별 이유 없습니다. 명확하게 'review' 텍스트임을 수강생 분들에게 인지 시키기 위해 그렇게 했습니다.

감사합니다.

0

10:05에서 

pipeline.fit(x_train, y_train)

으로 하면 아래와 같은 오류가 납니다.

Found input variables with inconsistent numbers of samples: [1, 17500]

x_train의 shape는 (1, 17500)이고

x_train['review']의 shape는 (17500, )으로 차이가 있어서 생기는 문제 같은데, 이게 왜 문제가 되는지는 잘 모르겠습니다.

pipeline 안의 counter vectorizer가 받을 수 있는 shape가 (n, ) 형태여서 그런걸까요..?

0

dooleyz3525님의 프로필 이미지
dooleyz3525
Instructor

JACKIE CHAN님, 동영상 강의 시간, 실행 시키는 코드와 에러 메시지 모두 올려 주셨으면 확인하겠습니다.

0

review 안쓰면 에러나오는데 왜 그럴까요 ㅡ

0

goodlucky1215님의 프로필 이미지
goodlucky1215
Questioner

답변 주셔서 감사합니다 ㅎㅎ

goodlucky12158445's profile image
goodlucky12158445

asked

Ask a question