RUVIDEO
Поделитесь видео 🙏

Machine Learning: Text Preprocessing and Vectorization

Data Science course by www.6benches.in
-------------------------------
Below topics covered in this Text preprocessing and vectorization lecture:
1)Process of converting text/unstructured data to structured data is vectorization.
2) Three types of vectrization:
2a) bag of words model
2b) count vectorizer
2c) tf-idf vectorizer

3) from sklearn.datasets import fetch_20newsgroups
twenty_train = fetch_20newsgroups(subset = 'train', shuffle = true)
twenty_train.target_names #display target categories
set(twenty_train.target) #display target category labelled
len(twenty_train.data) #number of input records

4)from sklearn.feature_extraction.text import CountVectorizer
vectorizer = CountVectorizer()
text = ["the quick brown fox jumped over lazy dog"]
vectorizer.fit(text) #tokenize and build vocabulary
print(vectorizer.vocabulary_) #summarize
vector = vectorizer.transform(text)#encode document
print(vector.shape)
print(vector.toarry())
print(type(vector))

5) Bag of words: gives importance to important words and less importance of non-important words
a)collect data
b)Design the vocabulary
c)create document vectors

6)tfidf acronym for Term frequency and inverse document frequency, is used often over the other two methods because of their limitation. Term frequency is calculated *within that* document and inverse document frequency calculates the frequency across *all* the documents and downscales it.
from sklearn.feature_extraction.text import TfidfVectorizer
vectorizer = TfidfVectorizer()
vector = vectorizer.fit_transform(text)
x = vector.toarray() #share remains same but converts csr sparse matrix to array
x[0] #display the probability(meaningful representation of words into numbers) of words in 0 document

Feed the above structured data(text to numbers) to ML models to classify text.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Machine Learning: Text Preprocessing and Vectorization», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.