Skip to Main Content
Машинное обучение с PyTorch и Scikit-Learn
book

Машинное обучение с PyTorch и Scikit-Learn

by Sebastian Raschka, Yuxi (Hayden) Liu, Vahid Mirjalili
May 2024
Beginner to intermediate content levelBeginner to intermediate
688 pages
26h
Russian
Foliant
Content preview from Машинное обучение с PyTorch и Scikit-Learn
Применение машинного обучения для смыслового анализа текста
265
>>> vect = HashingVectorizer(decode_error='ignore',
... n_features=2**21,
... preprocessor=None,
... tokenizer=tokenizer)
>>> clf = SGDClassifier(loss='log', random_state=1)
>>> doc_stream = stream_docs(path='movie_data.csv')
Выполнив приведенный код, мы инициализировали
HashingVectorizer
с помощью функ-
ции
tokenizer
и установили количество признаков равным
2**21
. Кроме того, мы по-
вторно инициализировали классификатор логистической регрессии, установив для па-
раметра потерь
SGDClassifier
значение
'log'
. Заметьте, что, выбирая большое количество
признаков в
Has
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

CompTIA Network+ -- Vorbereitung auf die Prüfung N10-009

CompTIA Network+ -- Vorbereitung auf die Prüfung N10-009

Markus Kammermann

Publisher Resources

ISBN: 9786011100342