반응형
tfidfvectorizer
-
sklearn TF-IDF vectorizer 사용 예시프로그래밍/자연어처리 2017. 2. 8. 15:36
Sklearn TfidfVectorizer 클래스 사용법 TF-IDF vectorizer 는 문서를 tf-idf의 feature matrix로 변환하는 클래스입니다. 문서에 CountVectorizer를 사용하고 TfidfTransformer를 사용한 것과 똑같은 결과를 가집니다. ,where is the total number of documents, and is the number of documents that contain term . The resulting tf-idf vectors are then normalized by the Euclidean norm:. 여기서 feature는 문장의 토큰 단위로 아래 TfidfVectorizer함수의 analyzer, tokenizer, token_pa..