Contents
How do you classify a variable discrete or continuous?
A discrete variable is a variable whose value is obtained by counting. A continuous variable is a variable whose value is obtained by measuring. A random variable is a variable whose value is a numerical outcome of a random phenomenon. A discrete random variable X has a countable number of possible values.
Is eye color a continuous variable?
Is eye Colour a continuous variable? Colors can be either, depending on how you look at it. Most commonly, we look on eye color as discrete with answers like blue, green, brown and so on. However, none of those are really distinct, that is, not all blue eyed people have the same color eye.
When to treat a discrete variable as a continuous variable?
If the discrete variable has many levels, then it may be best to treat it as a continuous variable. Treating a predictor as a continuous variable implies that a simple linear or polynomial function can adequately describe the relationship between the response and the predictor.
How is discretization used to measure continuous data?
Discretization is the process through which we can transform continuous variables, models or functions into a discrete form. We do this by creating a set of contiguous intervals (or bins) that go across the range of our desired variable/model/function. Continuous data is Measured, while Discrete data is Counted.
How is a discretized variable used in a decision tree?
The decision trees can find non-linear relationships between the discretized variable and the target variables. Use a linear model, while the bins do not have a linear relationship with the target variable. Improve the model by treating bins as categories with some sort of encoding.
Why are continuous features more difficult to discretize?
Continuous features have a smaller chance of correlating with the target variable due to infinite degrees of freedom and may have a complex non-linear relationship. Thus, it may be harder to interpret an such a function. After discretizing a variable, groups corresponding to the target can be interpreted.