Introduction to Text Classification in R with quanteda

ofrecido por
Coursera Project Network
En este proyecto guiado, tú:

Import text documents, reshape texts from documents to paragraphs, and turn your texts into a machine readable format.

Classify presidential concession speeches by political party using a Naive Bayes algorithm and assess the accuracy of the predictions.   

Clock2 hours
BeginnerPrincipiante
CloudNo se necesita descarga
VideoVideo de pantalla dividida
Comment DotsInglés (English)
LaptopSolo escritorio

In this guided project you will learn how to import textual data stored in raw text files into R, turn these files into a corpus (a collection of textual documents), reshape them into paragraphs from documents and tokenize the text all using the R software package quanteda. You will then learn how to classify the texts using the Naive Bayes algorithm. This guided project is for beginners interested in quantitative text analysis in R. It assumes no knowledge of textual analysis and focuses on exploring textual data (US Presidential Concession Speeches). Users should have a basic understanding of the statistical programming language R.

Habilidades que desarrollarás

  • Ordered Pair
  • Text Analysis
  • Algorithms
  • Statistical Programming Languages
  • Computer Programming

Aprende paso a paso

En un video que se reproduce en una pantalla dividida con tu área de trabajo, tu instructor te guiará en cada paso:

  1. Load text documents into R studio, convert a number of text documents into a corpus, and extract data from text document file names and add them to a new column in a dataframe. 

  2. Reshape the dataset into paragraphs from documents and check for balance in your labels. 

  3. Split up a text document corpus into tokens, or individual words and punctuations. Then clean the data by removing specific words and spellings.

  4. Create a Document Feature Matrix, divide it into train and test sets and run a Naive Bayes model. Then examine the model’s prediction accuracy and learn about accuracy, precision, and recall.   

  5. Run Naive Bayes models for a second and third time. Then examine the models' predictions and compare the model outputs with results from the previous task.

Cómo funcionan los proyectos guiados

Tu espacio de trabajo es un escritorio virtual directamente en tu navegador, no requiere descarga.

En un video de pantalla dividida, tu instructor te guía paso a paso

Preguntas Frecuentes

Preguntas Frecuentes

¿Tienes más preguntas? Visita el Centro de Ayuda al Alumno.