Variables are pieces of information that can be changed or controlled in an experiment. In the context of text analytics, variables can be things like the number of words in a document, the topic of a document, or the sentiment of a document.
In some cases, variables can be measured directly (like the number of words in a document), but in other cases, they need to be inferred from the text (like the topic of a document).
Variables can be global (like the overall sentiment of a text corpus) or local (like the sentiment of a particular sentence).
When dealing with text data, it is often useful to think about variables in terms of a “document-level” and a “word-level.”
At the document-level, we might be interested in variables like the topic of a document, the overall sentiment of a document, or the number of words in a document.
At the word-level, we might be interested in variables like the part-of-speech of a word, the sentiment of a word, or the number of times a word appears in a document.
In some cases, we might also be interested in variables that are not directly related to the text itself, but are instead derived from other information sources (like metadata). For example, we might use the publication date of a document as a variable in our text analytics models.
When working with text data, it is important to keep in mind that the way we define our variables can have a big impact on the results of our analyses. Therefore, it is important to think carefully about which variables we want to use and how we want to define them.
Types of Variable
Numeric value. A numeric variable is a variable whose values are numbers. numeric value examples A numeric variable can take on any value that is a number, including fractional values and negative values.
Characteristic value. A characteristic value is a value that describes a characteristic of an individual unit. For example, the color of a person’s hair would be a characteristic value.
Quantity value. A quantity value is a value that describes a quantity of something. For example, the number of people in a room would be a quantity value.