Such variables take a fixed and limited number of possible values. For example, classes, gender, blood type, etc. Also, in the case of categorical variables, the logical order does not match the categorical data, for example, “one”, “two”, “three”. But the sorting of these variables uses a logical order. For example, gender is a categorical variable and has categories — male and female, and there is no internal order in the categories. A purely categorical variable — it is a variable that allows you to simply assign categories, but you cannot clearly order the variables.
Terms related to volatility metrics:
Mode: most frequent value in data Example-
Data = ["Car", "Bat", "Bat", "Car", " Bat "," Bat "," Bat "," Bike "] Mode =" Bat "
Expected value: When working in machine learning, the categories must be linked with a numerical value to give an understanding of the machine. This gives an average based on the likelihood of the category appearing, i.e. expected value. Calculated by —
- & gt; Multiply each outcome by its probability of occurring. - & gt; Sum these values
Thus, the sum of the values multiplied by the probability of their occurrence is often used to sum the levels of variable factors.
Histograms: the frequency of each category, presented as columns.