Todos los libros

Profesional

Apps Acerca de Coach Iniciar sesión Empezar a leer

Quantitative Finance · Glosario

¿Qué es Tokenisation, bag of words, n-gram, tf-idf?

También llamado: tokenisation · bag of words · n-gram · term frequency--inverse document frequency

Definition 13.1 Machine Learning for Markets · Capítulo 13 — Text: From Bag of Words to Embeddings

Tokenisation splits a text into units (words, word pieces, punctuation), usually after normalising case. A bag of words represents a document by the counts of its tokens, forgetting their order. An n-gram is a sequence of nn consecutive tokens; bags of n-grams keep some order. Term frequency–inverse document frequency (tf-idf) weights the count of term ww in document dd by log⁡(N/nw)\log(N/n_w), where nwn_w of the NN documents contain ww, so that words found everywhere count for little; the rows are then scaled to unit length.

Leer en el capítulo →