Types of Attributes in Data Mining
An attribute (also called a feature or variable) describes one property of a data record — a customer's age, a product's category, a patient's test result. Correctly identifying an attribute's type isn't a formality: it directly determines which preprocessing techniques (covered in the lesson on data preprocessing techniques) and which distance or similarity measures (used throughout the clustering algorithms covered elsewhere in this series) can validly be applied to it. It's worth correcting a common oversimplification first: categorical, numerical, and binary are often presented as three separate, parallel types, but binary is actually a special case that falls under categorical — not a third category alongside it.
Qualitative (Categorical) Attributes
Nominal attributes have no inherent order — colors, product categories, city names. Comparing two nominal values only tells you whether they're equal or different, nothing more; this is exactly why nominal attributes require one-hot rather than ordinal encoding, per the encoding correction covered in the lesson on data preprocessing techniques.
Ordinal attributes do have a meaningful order — customer satisfaction rated low, medium, high — which makes comparisons like "greater than" meaningful in a way they aren't for nominal data. It's worth being precise about a real limitation here, though: order does not imply that the gaps between values are equal or numerically meaningful. Treating low = 1, medium = 2, high = 3 and averaging them assumes the distance from "low" to "medium" equals the distance from "medium" to "high," which is an assumption about the data, not a fact guaranteed by the ordering itself.
Binary attributes are a nominal attribute restricted to exactly two values (0/1, Yes/No), and they split further into two kinds worth distinguishing precisely. A symmetric binary attribute has two outcomes of equal importance — Gender: Male/Female — where neither value carries more information than the other. An asymmetric binary attribute has outcomes of unequal importance — a medical test result of Positive/Negative, where a shared Positive result between two patients is meaningful (both have a rare condition), while a shared Negative result is comparatively uninformative (both simply don't have it, which is true of most people). This distinction has a direct, computable consequence for similarity measures. Take two patients' symptom records (Fever, Cough, Fatigue, Rash), each 1 if present:
Patient A: Fever=1, Cough=1, Fatigue=0, Rash=0
Patient B: Fever=1, Cough=0, Fatigue=0, Rash=1
q (both 1) = 1 (Fever)
r (A=1, B=0) = 1 (Cough)
s (A=0, B=1) = 1 (Rash)
t (both 0) = 1 (Fatigue)
Treating these as ordinary (symmetric) binary attributes and using the simple matching coefficient, which counts every agreement including shared absences:
Simple matching = (q + t) / (q + r + s + t) = (1 + 1) / 4 = 0.50
But since symptom presence is asymmetric — two patients both not having a rash says almost nothing about how similar their conditions are — the Jaccard coefficient deliberately excludes the shared-absence count (t) from consideration entirely:
Jaccard = q / (q + r + s) = 1 / (1 + 1 + 1) ≈ 0.333
The Jaccard score (0.333) is the more meaningful of the two here: it reflects that these patients share only one actual symptom out of the three total symptoms present between them, without inflating that similarity using a shared absence that carries no real diagnostic information. This is exactly the kind of distance-measure decision that clustering algorithms like K-Medoids, covered in the lesson on partition algorithms, depend on getting right before any clustering even begins.
Quantitative (Numeric) Attributes
Discrete attributes take specific, separate values, typically whole numbers with no meaningful values in between — the number of items in an order, a count of website visits. Continuous attributes can take any value within a range, including decimals — height, temperature, income.
A second, less commonly taught distinction matters just as much: interval-scaled attributes have equal, meaningful gaps between values but no true zero point — temperature in Celsius, where 0°C doesn't mean "the absence of temperature," it's simply a point on an arbitrary scale, which is exactly why saying 20°C is "twice as hot" as 10°C is not a meaningful statement. Ratio-scaled attributes have a genuine zero point representing the total absence of the quantity — weight, height, income, where $0 means literally no money, which makes ratio statements meaningful: $20 genuinely is twice $10. This distinction determines which mathematical operations are valid: ratios are meaningful for ratio-scaled data and not for interval-scaled data, even though both support ordinary addition and subtraction.
Why Getting This Right Matters in Practice
Every attribute-type distinction in this lesson traces directly to a decision made somewhere else in this series: nominal versus ordinal determines the correct encoding strategy (covered in the lesson on data preprocessing techniques); symmetric versus asymmetric binary determines the correct similarity measure (Jaccard versus simple matching, as computed above); and discrete versus continuous, along with interval versus ratio, determines which statistical operations — means, ratios, correlations (covered in the lesson on correlation analysis) — are mathematically defensible to compute at all. Misidentifying an attribute's type doesn't just produce an inelegant analysis; it can produce a technically invalid one, computed with operations the data's actual scale never supported in the first place.